Reads a SofuML file using an XmlReader. Be sure the file is SofuML tree, otherwise use SofuReader.LoadFile() instead.
Declaration Syntax
C# |
public SofuMLParser( XmlReader reader )
Parameters
- reader (XmlReader)
- XmlReader to read from
Remarks
Might be useful to read included parts of other XML trees
Examples
CopyC#
// Inc.xml : // <SofuInfo> // <Sofu> ... </Sofu> // <!-- Some other elements --> // <//SofuInfo> XmlTextReader reader = new XmlTextReader("http://namespace.net/",File.OpenRead("Inc.xml")); while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element) { if (reader.Name == "Sofu") { Sofu.Sofu.SofuMLParser p = new Sofu.Sofu.SofuMLParser(reader.ReadSubtree()); // Extract the whole Subtree p.WriteML("Exc.xml"); //Extracted SofuML; } // Something else } }