i fairly new to all of this
listed below is the format of a dynamic xml file that i create on the fly and what i am trying to do with this dynamically created xml file is the following
XmlDocument docXml = new XmlDocument();
docXml.LoadXml(sb.ToString()); *sb contains the contents of the xml file
XslCompiledTransform docXsl = new XslCompiledTransform();
docXsl.Load(Server.MapPath("items.xsl"));
System.IO.StringWriter strStringWriter = new System.IO.StringWriter();
docXsl.Transform(docXml, null, strStringWriter);
and it fails abviously because its not formatted properly, but i read somewhere that you could include an ELEMENTS tag at the begining of the file which would read the xml file properly but it did not work and it gave me the following error: 'ELEMENT' is an unexpected token. The expected token is 'DOCTYPE'. Line 1, position 3.
Could anybody provide any feedback on how to make the xml file listed below function properly with my xml commands above?
<ROOTITEMS>
<ITEM>
<PONUMBER></PONUMBER>
<LOCATION></LOCATION>
<CODE></CODE>
<QUANTITY></QUANTITY>
<DATE></DATE>
</ITEM>
<ITEM>
<PONUMBER></PONUMBER>
<LOCATION></LOCATION>
<CODE></CODE>
<QUANTITY></QUANTITY>
<DATE></DATE>
</ITEM>
<SHIPPINGINFORMATION>
<COMPANYNAME></COMPANYNAME>
<ADDRESS></ADDRESS>
<CITY></CITY>
<PROVINCE></PROVINCE>
<STATE></STATE>
<CONTACT></CONTACT>
<PHONENUMBER></PHONENUMBER>
<FAXNUMBER></FAXNUMBER>
<CONTACTEMAIL></CONTACTEMAIL>
</SHIPPINGINFORMATION>
</ROOTITEMS>