|
Member 3784412 wrote: while sending Xml file over geeting the error
That does not mean anything in english. Perhaps you need help with translation when writing your post.
|
|
|
|
|
hi i have to create an xml file and in that file the number of child elements vary during the run time that is i have to insert different options and my xml file should looklike this
<options>
<option>
<optionid>1<\optionid>
<flag> true<\flag>
<optionname>....<\optionname>
<option>
<option>
<optionid>2<\optionid>
<flag> false<\flag>
<optionname>....<\optionname>
.
.
.
<options>
the options will be given by me from the ui during the run time so i can give as many options as i can so the number of options are varying in this case how can i create the xmldocument for this </options></optionname></flag></optionid></option></option></optionname></flag></optionid></option></options>
|
|
|
|
|
pavan ravipati wrote: how can i create the xmldocument
Define more specifically what you mean by "the xmldocument".
|
|
|
|
|
I have an XML file:
<root>
<foo>
<!--Content Here-->
</foo>
</root>
Now I want generate an HTML file from it. The HTML has two vertical frames. The left one displays the treeview of the XML file. And I want the right one display content of the tree view: when I click on the "foo" node, the content will be displayed on the right.
Now I have written an XSL file to get a treeview:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html" />
<xsl:template match="/">
<html>
<head>
<!-- Some JS code to deal with the "expand", "collapse"... sth like these-->
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a onclick="toggle(this)"><img src="plus.gif" /><img src="folder.gif" />root</a>
<div style="display:none;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="15"></td>
<td>
<a><img src="page.gif" />Foo</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
An HTML file which has:
<html>
<head>
<script language="javascript">
function populateFrames(){
var x = new ActiveXObject("Microsoft.XMLDOM");
var s = new ActiveXObject("Microsoft.XMLDOM");
x.async = false
s.async = false
x.load("source.xml");
s.load("tree.xsl");
var html = x.transformNode(s);
var destination = document.frames("header").document.open("text/html","replace");
destination.write(html);
}
</script>
</head>
<frameset onload="populateFrames()" cols="25%,*">
<frame name="header" scrolling="auto" target="main" />
<frame name="main" />
</frameset>
</html>
As you can see, the tree will display in the "header" frame, and I want the content in the "main" frame.
Could anyone tell me how to do this? It's very urgent: I'm waiting on line. Thanks very much for your help.
modified on Wednesday, March 11, 2009 1:03 PM
<div class="ForumMod">modified on Wednesday, March 11, 2009 1:06 PM</div>
|
|
|
|
|
Whats the use of static Monitor in threads?
|
|
|
|
|
Ok so im new to XML importing with visual basic 6. I do a little programming on the side. So heres my question. I need to Import a specific Variable off of a bare xml webpage and need help figuring up the code. Im going to use a database of items with a unique Item id to get the exact page but i need to know how to extract a specific value off the automatically generated page.
For example when i click the update button in my program it will build the url string, then connect to the net to the specific page grab the value needed and move onto the next id number.
The generated pages will all look the same except for the values in the generated page will change and the only part of the url that will change is the item id number
I.E. http://eve-central.com/api/marketstat?typeid=34
http://eve-central.com/api/marketstat?typeid=35 etc. etc
Now the specific value im interested in is the median value under the buy group of the page.
!!! Any code or simple tutorials on the subject are GREATLY APPRECIATED !!!
Krieath
|
|
|
|
|
One often used method of working with XML in a Microsoft environment is to use the MSXML ActiveX object. To learn how to use MSXML and all the XML technologies associated with your problem I suggest you start looking at some of the tutorials at www.w3schools.com
|
|
|
|
|
I am new to XML. I have tried to search for an answer to this question but haven't found any good answers.
I have created an XSD that describes a programming language (in this case C).
I have created a simple XML file that describes a simplistic hello world type program.
I have created a XSLT file that will transform that XML file into a c program.
What I would like to do is transform the XML and save the output a text or more specifically my .c file. Then I should be able to create another XSLT that would generate my .h file.
<xsl:output method="text" /> in my XSLT file.
When I load the XML file in IExplorer, the output is text on the screen, and I can copy and paste the text into a text file, but when I save as in IE it saves the original untransformed XML.
Is there a way to save the transformed output? Do I need to transform it outside of a browser somehow?
|
|
|
|
|
shortdog wrote: Do I need to transform it outside of a browser somehow?
Copy/Paste from the browser might work.
Otherwise you can do a transform to a file using a XSLT utility or tool, or you might build one yourself. In most languages that have access to an XML library it takes about 5 lines of code to build a XSLT command line program.
|
|
|
|
|
Thanks, I was making this harder than it needed to be. A simple 2 line C# program was all I needed.
|
|
|
|
|
Hi,
Could someone plz help in generating the out put from the xml given below...
The XML Input is given below
- <Assessment>
- <Respiratory>
<Forced>false</Forced>
<Irregular>false</Irregular>
<Kussmal>true</Kussmal>
<Labored>true</Labored>
<NasalFlaring>true</NasalFlaring>
<Normal>false</Normal>
<Rapid>false</Rapid>
</Respiratory>
</Assessment>
The Output should be the following (based on the value of true/false) as
HTML..
Respiratory condition: Kussmal condition,Labored condition, Nasal Flaring
|
|
|
|
|
Try the XSLT Tutorials at www.w3schools.com, the are tailored to beginners.
|
|
|
|
|
Hi,
I am wanted to convert/store a string, which has XML elements, into a dataset or data table. The string that I am reading from a service is the result of my query. I have written the following code,
{
DataSet ds = new DataSet();
StringReader stream = new StringReader(xmlString);
ds.ReadXml(stream);
DataTable dt = ds.Tables[0];
dg.DataSource = dt;
return dt;
}
I am receiving two different type of strings, they are
xmlString1:
<?xml version="1.0" encoding="UTF-8"?>
<nh:rows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nh="http://nhdb">
<nh:urnumber>0123456</nh:urnumber>
<nh:surname>xxxxx</nh:surname>
<nh:forename>yyy</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1958-10-05</nh:dob>
<nh:address>Mxaxixlx</nh:address>
<nh:suburb>Prxxxx</nh:suburb>
<nh:state>Vxxx</nh:state>
<nh:postcode>3072</nh:postcode>
<nh:patientphone>phone</nh:patientphone>
<nh:gender>Female</nh:gender>
<nh:unit>Sxxxxx Oxxxx</nh:unit>
<nh:ward>Bxxx DPxx</nh:ward>
</nh:rows>
xmlString2:
<?xml version="1.0" encoding="UTF-8"?>
<nh:rows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nh="http://nhdb">
<nh:urnumber>0123450</nh:urnumber>
<nh:surname>Cxxxxxx</nh:surname>
<nh:forename>RxxxxxT</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1954-07-19</nh:dob>
<nh:address>'ANNANDALE'</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Male</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
<nh:urnumber>0123451</nh:urnumber>
<nh:surname>KROL</nh:surname>
<nh:forename>ANILLA</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1958-12-10</nh:dob>
<nh:address>68A CLARENCE</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Female</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
<nh:urnumber>0123452</nh:urnumber>
<nh:surname>GEYER</nh:surname>
<nh:forename>MAUREEN</nh:forename>
<nh:middlename></nh:middlename>
<nh:dob>1948-06-02</nh:dob>
<nh:address>19 JAYSON</nh:address>
<nh:suburb></nh:suburb>
<nh:state></nh:state>
<nh:postcode></nh:postcode>
<nh:patientphone></nh:patientphone>
<nh:gender>Female</nh:gender>
<nh:unit></nh:unit>
<nh:ward></nh:ward>
</nh:rows>
The above code works perfectly for the xmlString1 and it is converting a data table with single row of data for the cloumns urnumber, surname, forename, middlename, dob, address, suburb,state, postcode,patientPhone, gender, unit, ward.
When I am receiving the xmlString2, the data table is populated with only one column urnumber_Text(for all ur numbers in the xml string).
What am I missing here? Is there any other genuine way of doing it?
Thanks a Lot for your valuable time and invaluable advice.
Looking for advice,
Renu
|
|
|
|
|
Renukapadhamanaban wrote: What am I missing here?
The XML is not formatted as required for generalized recognition of the records. Each set of records would need a parent element to form a collection. This appears to be absent in what you posted.
Renukapadhamanaban wrote: Is there any other genuine way of doing it?
Yes you could write code to transform the XML into the more standard form then it should load fine. This might be accomplished with XSLT but it might be simpler to use like a SAX parser or whatever the .NET equivalent is.
|
|
|
|
|
Hi Mike,
Thanks a lot for your valuable advice.
I tried with the parent element to each row and now it is working alright. Now I am working on XSLT to format the XML string.
THanks for your time.
Renu
|
|
|
|
|
I need to add header and datetime and orientation in excel when user print the excel document.
public static void excelprint(DataSet source, string fileName)
{
bool status = false;
try
{
System.IO.StreamWriter excelDoc;
excelDoc = new System.IO.StreamWriter(fileName);
const string startExcelXML = "<xml version>\r\n<Workbook " +
"xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\r\n" +
" xmlns =\"urn:schemas-microsoft-com:office:office\"\r\n " +
"xmlns:x=\"urn:schemas- microsoft-com:office:" +
"excel\"\r\n xmlns:ss=\"urn:schemas-microsoft-com:" +
"office:spreadsheet\">\r\n <Styles>\r\n " +
"<Style ss:ID=\"Default\" ss:Name=\"Normal\">\r\n " +
"<Alignment ss:Vertical=\"Bottom\"/>\r\n <Borders/>" +
"\r\n <Font/>\r\n <Interior/>\r\n <NumberFormat/>" +
"\r\n <Protection/>\r\n </Style>\r\n " +
"<Style ss:ID=\"BoldColumn\">\r\n <Font " +
"x:Family=\"Swiss\" ss:Bold=\"1\"/>\r\n </Style>\r\n " +
"<Style ss:ID=\"StringLiteral\">\r\n <NumberFormat" +
" ss:Format=\"@\"/>\r\n </Style>\r\n <Style " +
"ss:ID=\"Decimal\">\r\n <NumberFormat " +
"ss:Format=\"0.00\"/>\r\n </Style>\r\n " +
"<Style ss:ID=\"Integer\">\r\n <NumberFormat " +
"ss:Format=\"0\"/>\r\n </Style>\r\n <Style " +
"ss:ID=\"DateLiteral\">\r\n <NumberFormat " +
"ss:Format=\"mm/dd/yyyy;@\"/>\r\n </Style>\r\n " +
"</Styles>\r\n ";
const string endExcelXML = "</Workbook>";
int rowCount = 0;
int sheetCount = 1;
excelDoc.Write(startExcelXML);
for (int worksheet = 0; worksheet < source.Tables.Count; worksheet++)
{
excelDoc.Write("<Worksheet ss:Name=\"" + source.Tables[worksheet].TableName + "\">");
excelDoc.Write("<Table>");
excelDoc.Write("<Row>");
for (int x = 0; x < source.Tables[worksheet].Columns.Count; x++)
{
excelDoc.Write("<Cell ss:StyleID=\"BoldColumn\"><Data ss:Type=\"String\">");
excelDoc.Write(source.Tables[worksheet].Columns[x].ColumnName);
excelDoc.Write("</Data></Cell>");
}
excelDoc.Write("</Row>");
for (int x = 0; x < source.Tables[worksheet].DefaultView.Count; x++)
{
rowCount++;
if (rowCount == 64000)
{
rowCount = 0;
sheetCount++;
excelDoc.Write("</Table>");
excelDoc.Write(" </Worksheet>");
excelDoc.Write("<Worksheet ss:Name=\"Sheet" + worksheet + "\">");
excelDoc.Write("<Table>");
}
excelDoc.Write("<Row>"); //ID=" + rowCount + "
for (int y = 0; y < source.Tables[worksheet].Columns.Count; y++)
{
System.Type rowType;
rowType = source.Tables[worksheet].DefaultView[x][y].GetType();
switch (rowType.ToString())
{
case "System.String":
//string XMLstring = x[y].ToString();
string XMLstring = source.Tables[worksheet].DefaultView[x][y].ToString();
XMLstring = XMLstring.Trim();
XMLstring = XMLstring.Replace("&", "&");
XMLstring = XMLstring.Replace(">", ">");
XMLstring = XMLstring.Replace("<", "<");
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
excelDoc.Write(XMLstring);
excelDoc.Write("</Data></Cell>");
break;
case "System.DateTime":
// DateTime XMLDate = (DateTime)x[y];
DateTime XMLDate = (DateTime)source.Tables[worksheet].DefaultView[x][y];
string XMLDatetoString = "";
XMLDatetoString = XMLDate.Year.ToString() +
"-" +
(XMLDate.Month < 10 ? "0" +
XMLDate.Month.ToString() : XMLDate.Month.ToString()) +
"-" +
(XMLDate.Day < 10 ? "0" +
XMLDate.Day.ToString() : XMLDate.Day.ToString()) +
"T" +
(XMLDate.Hour < 10 ? "0" +
XMLDate.Hour.ToString() : XMLDate.Hour.ToString()) +
":" +
(XMLDate.Minute < 10 ? "0" +
XMLDate.Minute.ToString() : XMLDate.Minute.ToString()) +
":" +
(XMLDate.Second < 10 ? "0" +
XMLDate.Second.ToString() : XMLDate.Second.ToString()) +
".000";
excelDoc.Write("<Cell ss:StyleID=\"DateLiteral\">" +
"<Data ss:Type=\"DateTime\">");
excelDoc.Write(XMLDatetoString);
excelDoc.Write("</Data></Cell>");
break;
case "System.Boolean":
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
//excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.Int16":
case "System.Int32":
case "System.Int64":
case "System.Byte":
excelDoc.Write("<Cell ss:StyleID=\"Integer\">" +
"<Data ss:Type=\"Number\">");
// excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.Decimal":
case "System.Double":
excelDoc.Write("<Cell ss:StyleID=\"Decimal\">" +
"<Data ss:Type=\"Number\">");
// excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.DBNull":
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
excelDoc.Write("");
excelDoc.Write("</Data></Cell>");
break;
default:
throw (new Exception(rowType.ToString() + " not handled."));
}
}
excelDoc.Write("</Row>");
}
excelDoc.Write("</Table>");
excelDoc.Write(" </Worksheet>");
}
excelDoc.Write(endExcelXML);
excelDoc.Close();
status = true;
// MessageBox.Show("Data exported to excel file successfuly");
}
catch (Exception)
{
status = false;// MessageBox.Show("Error in exporting data to excel file");
}
}
|
|
|
|
|
@vikram_asv:
Please repost and use the <pre> tag to allow us to easily read your code. Thanks!
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hello Curtis,
I am sending u code which i used and modify with my criteria.I am able to export data to a different worksheets. But all i need is when user prints the excel sheet i need to put header, footer , date and orientation - landscape dynamically . I search but no luck may be anyone can help me about this . Here is the link
http://www.codeproject.com/KB/dotnet/ExportToExcel.aspx
|
|
|
|
|
I don't use Microsoft Office, so I can't answer this directly. However, if you look at this article Dive into SpreadsheetML (Part 1 of 2)[^], they will show you how to set print options and what not.
Also, set the header and footer of an Excel spreadsheet to some distinct values, save it in the XML format, and look for those nodes.
Reverse engineering is the way to go, here.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hello Curtis, I am again reposting the code with pre tag so that it can to easy to read what u say
I need to add header and datetime and orientation in excel when user print the excel document.I am not able to add datetime ,orientation,header programmatically .if u could help me greatly appreciated where i can add this items in my code so that i can see when i print excel document.
public static void excelprint(DataSet source, string fileName)
{
bool status = false;
try
{
System.IO.StreamWriter excelDoc;
excelDoc = new System.IO.StreamWriter(fileName);
const string startExcelXML =
<xml version="">
<workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet">
xmlns ="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<styles>
<alignment ss:vertical="Bottom">
<borders>
<font />
<interior />
<numberformat />
<protection />
</borders></alignment>
<font x:family="Swiss" ss:bold="1" xmlns:x="#unknown" />
<numberformat ss:format="@" />
<numberformat ss:format="0.0000" />
<numberformat ss:format="0" />
<numberformat ss:format="mm/dd/yyyy;@" />
const string endExcelXML = "</Workbook>";
int rowCount = 0;
int sheetCount = 1;
excelDoc.Write(startExcelXML);
for (int worksheet = 0; worksheet < source.Tables.Count; worksheet++)
{
excelDoc.Write("<Worksheet ss:Name=\"" + source.Tables[worksheet].TableName + "\">");
excelDoc.Write("<Table>");
excelDoc.Write("<Row>");
for (int x = 0; x < source.Tables[worksheet].Columns.Count; x++)
{
excelDoc.Write("<Cell ss:StyleID=\"BoldColumn\"><Data ss:Type=\"String\">");
excelDoc.Write(source.Tables[worksheet].Columns[x].ColumnName);
excelDoc.Write("</Data></Cell>");
}
excelDoc.Write("</Row>");
for (int x = 0; x < source.Tables[worksheet].DefaultView.Count; x++)
{
rowCount++;
if (rowCount == 64000)
{
rowCount = 0;
sheetCount++;
excelDoc.Write("</Table>");
excelDoc.Write(" </Worksheet>");
excelDoc.Write("<Worksheet ss:Name=\"Sheet" + worksheet + "\">");
excelDoc.Write("<Table>");
}
excelDoc.Write("<Row>"); //ID=" + rowCount + "
for (int y = 0; y < source.Tables[worksheet].Columns.Count; y++)
{
System.Type rowType;
rowType = source.Tables[worksheet].DefaultView[x][y].GetType();
switch (rowType.ToString())
{
case "System.String":
//string XMLstring = x[y].ToString();
string XMLstring = source.Tables[worksheet].DefaultView[x][y].ToString();
XMLstring = XMLstring.Trim();
XMLstring = XMLstring.Replace("&", "&");
XMLstring = XMLstring.Replace(">", ">");
XMLstring = XMLstring.Replace("<", "<");
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
excelDoc.Write(XMLstring);
excelDoc.Write("</Data></Cell>");
break;
case "System.DateTime":
// DateTime XMLDate = (DateTime)x[y];
DateTime XMLDate = (DateTime)source.Tables[worksheet].DefaultView[x][y];
string XMLDatetoString = "";
XMLDatetoString = XMLDate.Year.ToString() +
"-" +
(XMLDate.Month < 10 ? "0" +
XMLDate.Month.ToString() : XMLDate.Month.ToString()) +
"-" +
(XMLDate.Day < 10 ? "0" +
XMLDate.Day.ToString() : XMLDate.Day.ToString()) +
"T" +
(XMLDate.Hour < 10 ? "0" +
XMLDate.Hour.ToString() : XMLDate.Hour.ToString()) +
":" +
(XMLDate.Minute < 10 ? "0" +
XMLDate.Minute.ToString() : XMLDate.Minute.ToString()) +
":" +
(XMLDate.Second < 10 ? "0" +
XMLDate.Second.ToString() : XMLDate.Second.ToString()) +
".000";
excelDoc.Write("<Cell ss:StyleID=\"DateLiteral\">" +
"<Data ss:Type=\"DateTime\">");
excelDoc.Write(XMLDatetoString);
excelDoc.Write("</Data></Cell>");
break;
case "System.Boolean":
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
//excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.Int16":
case "System.Int32":
case "System.Int64":
case "System.Byte":
excelDoc.Write("<Cell ss:StyleID=\"Integer\">" +
"<Data ss:Type=\"Number\">");
// excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.Decimal":
case "System.Double":
excelDoc.Write("<Cell ss:StyleID=\"Decimal\">" +
"<Data ss:Type=\"Number\">");
// excelDoc.Write(x[y].ToString());
excelDoc.Write(source.Tables[worksheet].DefaultView[x][y].ToString());
excelDoc.Write("</Data></Cell>");
break;
case "System.DBNull":
excelDoc.Write("<Cell ss:StyleID=\"StringLiteral\">" +
"<Data ss:Type=\"String\">");
excelDoc.Write("");
excelDoc.Write("</Data></Cell>");
break;
default:
throw (new Exception(rowType.ToString() + " not handled."));
}
}
excelDoc.Write("</Row>");
}
excelDoc.Write("</Table>");
excelDoc.Write(" </Worksheet>");
}
excelDoc.Write(endExcelXML);
excelDoc.Close();
status = true;
// MessageBox.Show("Data exported to excel file successfuly");
}
catch (Exception)
{
status = false;// MessageBox.Show("Error in exporting data to excel file");
}
}
|
|
|
|
|
xml version
/*
<xml version>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns ="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="BoldColumn">
<Font x:Family="Swiss" ss:Bold="1"/>
</Style>
<Style ss:ID="StringLiteral">
<NumberFormat ss:Format="@"/>
</Style>
<Style ss:ID="Decimal">
<NumberFormat ss:Format="0.0000"/>
</Style>
<Style ss:ID="Integer">
<NumberFormat ss:Format="0"/>
</Style>
<Style ss:ID="DateLiteral">
<NumberFormat ss:Format="mm/dd/yyyy;@"/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
</Worksheet>
</Workbook>
*/
|
|
|
|
|
use pre tag mate as curtis asked you. Look around for pre tag before you post and post once again.
All the best
|
|
|
|
|
Howdy'
I'm generating some XML files with MSXML; The text is all put on one single line;
so I'm trying to transform the document with some XSL "black" magic.
The stylesheet (taken from some google-search):
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
This works well, except for one minor thing.
For empty "tags", the transformation transform :
<MyTag attribute="value"/>
to
<MyTag attribute="value"></MyTag >
I'm not quite familiar with XSL, and was wondering if there's a way to not create the empty closing tags ?
I hope it makes sens.
Thanks.
Max.
This signature was proudly tested on animals.
|
|
|
|
|
Is there a reason why you don't want the closing tag? Both of the nodes, the one with the /> and the one with the ></MyTag> have the same meaning in XML and should parse the same way....
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
For no other reason than "aestheticism"
This signature was proudly tested on animals.
|
|
|
|