In XML, what are the nodes with question marks called, and how do I add them in C#? -


here's example of xml file created in infopath:

  <?xml version="1.0" encoding="utf-8"?>   <?mso-infopathsolution solutionversion="1.0.0.1" productversion="12.0.0" piversion="1.0.0.0" href="file:///c:\metastorm\sample%20procedures\infopath%20samples\template1.xsn" name="urn:schemas-microsoft-com:office:infopath:template1:-myxsd-2010-07-21t14-21-13" ?>   <?mso-application progid="infopath.document" versionprogid="infopath.document.2"?>   <my:myfields xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myxsd/2010-07-21t14:21:13" xml:lang="en-us">     <my:field1>hello</my:field1>     <my:field2>world</my:field2>   </my:myfields> 

what top 3 nodes question mark called... , how create them in c#?

so far have this:

  xmldocument xmldoc;   xmldeclaration xmldeclaration;    xmldoc=new xmldocument();   xmldeclaration = xmldoc.createnode(xmlnodetype.xmldeclaration, "", "") xmldeclaration;   xmldeclaration.encoding = "utf-8";   xmldoc.appendchild(xmldeclaration); 

this works fine top xml declaration node , how create next two?

thanks in advance :)

these called processing instructions. add 'em using xmldocument.createprocessinginstruction.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -