.xml 파일을 실행하는 데 필요한 정보를 누군가에게 알려 줄 수 있습니까? 메모장 에서 만들 수 있으며 .xml 확장명으로 저장 한 다음 Windows에서 파일을 두 번 클릭하거나 수행 할 수 있습니까? 특수 편집기가 필요합니까?xml - XML 파일을 만드는 방법/실행하는 방법
Java 응용 프로그램이 있고 내 .jar 파일의 JNLP 파일이 필요한 Jave Web Start techonology를 사용하려고합니다.
감사합니다.
.xml 파일을 실행하는 데 필요한 정보를 누군가에게 알려 줄 수 있습니까? 메모장 에서 만들 수 있으며 .xml 확장명으로 저장 한 다음 Windows에서 파일을 두 번 클릭하거나 수행 할 수 있습니까? 특수 편집기가 필요합니까?xml - XML 파일을 만드는 방법/실행하는 방법
Java 응용 프로그램이 있고 내 .jar 파일의 JNLP 파일이 필요한 Jave Web Start techonology를 사용하려고합니다.
감사합니다.
편집자는 필요하지 않지만 편집하는 동안 많은 도움이됩니다.
xml 파일을 실행할 수 없습니다. 그러나 xml 파일을 사용하는 프로그램을 실행할 수 있습니다.
는 "실행"XML 파일로, 당신은 아마 다음과 같은 성명 같은 것을 필요java -jar yourFile.jar packageOfMainMethod.ClassWithMainMethod yourXML.xml
을하지만 이것은 당신이 실행하려고 프로그램에 따라 달라집니다.
물론 xml 파일을 실행할 수 있습니다. 정확히 말하자면 xslt 코드가있는 xml의 특별한 종류 인 xsl 파일을 실행할 수 있지만 다른 소스 코드처럼 순수 텍스트도 실행할 수 있습니다. xslt 스크립트가 실행되는 인터프리터가 브라우저입니다.
두 파일이 필요합니다.
a. 사용할 데이터 및 정보 ("test.xml"로 지칭)를 포함하는 xml 파일 : 이름 : "test.xml"
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<root>data</root>
b. 스크립트를 ("test.xsl을"이라는 이름을) 포함하는 XSL 파일 : 당신의 OS는 xml 파일을 열기에 사용할 프로그램을 알 수없는 경우
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>Show XML</title>
<head>
<body>
<xsl:value-of select="."/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
, 그것은 브라우저의 말해. 그리고 예, 메모장이나 firefox 또는 ie와 같은 브라우저 만 있으면됩니다. XML을 알고있는 것을 사용하는 것이 더 편리하지만, 메모장은 이미 자바가 필요없는 standanlone이라는 완전한 개발 환경이므로, 왜 당신이 그것을 언급하는지 모르겠습니다.
어떻게 했습니까? 당신은 실제로 XSLT 변환 XML 파일을 얻을? –
XML 파일이 실제로 XSLT 변환 인 것은 아니지만 "두 번 클릭 실행"효과를 얻는 두 번째 XML 파일이 필요합니다. 최소한 이것이 거의 모든 PC에서 작동하는 유일한 방법입니다. – Andreas
작동하지 않습니다. 어떻게 할 수 있는지 명확히 할 수 있습니까? –
이 C 번호를 제
{ 호출 메소드 ..............
public void InvokeKey()
{
DSXml.ReadXml(@"c:\users\general\documents\visual studio 2010\Projects\xml_practice\xml_practice\todolist.xml");
DataColumn[] ID = new DataColumn[1];
ID[0] = DSXml.Tables[0].Columns[0];
DSXml.Tables[0].PrimaryKey = ID;
}
데이터 세트 DsXml = 새로운 데이터 세트를 사용하여 XML 파일에 삽입하는 간단한 인(); DataRow DrXML;
string Date = Convert.ToString(System.DateTime.Now.ToString("d"));
string Time = Convert.ToString(System.DateTime.Now.ToString("hh:mm:ss"));
int ID;
InvokeKey();
DRXML = DSXml.Tables[0].Rows.Find(ID);
DsXml.WriteXml(@"path");
DrXML = DsXml.Tables[0].NewRow();
DrXML[0] = ID;
DrXML[0] = ID;
DrXML[0] = ID;
DrXML[0] = ID;
DrXML[0] = ID;
DrXML[0] = ID;
DsXml.Tables[0].Rows.Add(DrXML);
DsXml.WriteXml(@"path");
dt = REport.LoadSubjects();
Excel.Application xlApp = new Excel.Application(); // open app
xlApp.Visible = true;
Excel.Workbook xlWorkBook = xlApp.Workbooks.Add(1); //open workbook
Excel.Worksheet xlSheet = (Excel.Worksheet)xlWorkBook.Worksheets[1]; //open worksheet
xlSheet.Cells.Rows.Columns.AutoFit();
string strTempVariable = dt.Rows[0][0].ToString(); //temporary variable
xlSheet.Cells[4, 1] = dt.Rows[0][0].ToString();
xlSheet.Cells[1, 1] = "Employees group header";
for (int count = 0; count < dt.Columns.Count;count++)
{
xlSheet.Cells[3, count+1] = dt.Columns[count].ColumnName;// prints column names
}
int group=0;
int total=0;
int intRow = 5;//manages xlsheet
for (int counter = 0; counter < dt.Rows.Count;counter++)
{
if (strTempVariable == dt.Rows[counter]["City"].ToString())
{
xlSheet.Cells[intRow, 2] = dt.Rows[counter][1];
xlSheet.Cells[intRow, 3] = dt.Rows[counter][2];
xlSheet.Cells[intRow, 4] = dt.Rows[counter][3];
xlSheet.Cells[intRow, 5] = dt.Rows[counter][4];
group++;
total++;
intRow++;
}
else
{
xlSheet.Cells[intRow, 4] = "group name " + strTempVariable + " " + group.ToString();
strTempVariable = dt.Rows[counter][0].ToString();
intRow++;
xlSheet.Cells[intRow, 1] = strTempVariable;
intRow++;
counter--;
group = 0;
}
}
intRow++;
xlSheet.Cells[intRow, 4] = "group name " + strTempVariable + " "+group.ToString();
intRow++;
xlSheet.Cells[intRow, 4] = "GrandTotal " + " "+total.ToString();
xlWorkBook.Close(true, "GROUP REPORT", 0);//The name of the worksheet
xlApp.Quit();
// return "Report Successfully";
}
공공 문자열 ReportTimeTable() {
DataTier.clsDataAccess Data = new DataTier.clsDataAccess();
int intCount = 0;
int intCount2 = 5;
Data.sqlcon.Close();
Data.sqlcon.Open();
Data.sqlAdpter = new SqlDataAdapter("SELECT * FROM USERS ORDER BY password",Data.sqlcon);
DataTable ReportDt = new DataTable("Report");
Data.sqlAdpter.Fill(ReportDt);
Data.sqlcon.Close();
string strMsg = "";
Excel.Application xlApp = new Excel.Application();
xlApp.Visible = true;
Excel.Workbook xlWorkbook = xlApp.Workbooks.Add(1);
Excel.Worksheet xlWorksheet = (Excel.Worksheet)xlWorkbook.Sheets[1];
// Setting cell values
((Excel.Range)xlWorksheet.Cells[1, "A"]).Value2 = "Report - USERS "; //main heading
((Excel.Range)xlWorksheet.Cells[3, "A"]).Value2 = "USERNAME"; //field headings
((Excel.Range)xlWorksheet.Cells[3, "B"]).Value2 = "PASSWORD";
// ((Excel.Range)xlWorksheet.Cells[3, "C"]).Value2 = "MARK";
for (intCount = 0; intCount < ReportDt.Rows.Count; intCount++)
{
xlWorksheet.Cells[intCount2, "A"] = ReportDt.Rows[intCount][0];
xlWorksheet.Cells[intCount2, "B"] = ReportDt.Rows[intCount][1];
// xlWorksheet.Cells[intCount2, "C"] = ReportDt.Rows[intCount][2];
intCount2++;
}
xlWorksheet.Cells.Columns.AutoFit();
strMsg = "report successful";
return strMsg;
XML은 텍스트 - 그것은 수 없습니다 아무것도에 "실행". 프로그램은 XML을 읽고 해석하고 정보로 무엇인가 할 수 있습니다. – Oded
메모장에서 xml 파일을 열 수 있습니다. 아니면 [Notepad ++] (http://notepad-plus-plus.org/)를 사용해보십시오. 지정된 확장자 (이 경우 .xml)에 대한 파일을 여는 기본 응용 프로그램은 원하는 응용 프로그램으로 변경할 수 있습니다. –
'혼란 - 오브 - 아이디어'라는 태그가 있어야합니다[email protected] : XML은 데이터이므로 데이터를 실행하지 않습니다.를 참조하십시오. 그건 그렇고 일반 텍스트 데이터, 그래서 특별한 편집기 (하지만 괜찮은 텍스트 편집기가 매우 도움이됩니다 - +1 메모장 + +). – delnan