[This is preliminary documentation and is subject to change.]
Allows safe iteration of Xml Child elements of a given element
| C# | Visual Basic | Visual C++ |
public sealed class XmlElementEnumerator : IEnumerable
Public NotInheritable Class XmlElementEnumerator _ Implements IEnumerable
public ref class XmlElementEnumerator sealed : IEnumerable
| All Members | Constructors | ||||
| Icon | Member | Description |
|---|---|---|
| XmlUtils..::XmlElementEnumeratorXmlUtils..::XmlElementEnumeratorNew(XmlElement) | ||
| XmlUtils..::XmlElementEnumeratorXmlUtils..::XmlElementEnumeratorNew(XmlNodeList) |
Example of code without using this class
CopyC#
Example Usage using the XmlElementEnumerator
CopyC#
foreach( XmlNode a_o in new a_XmlDoc.DocumentElement ) { if( a_o is XmlElement ) { XmlElement a_Element = (XmlElement)a_o Console.WriteLine( a_Element.Name ); foreach( XmlNode a_ChildElement in a_Element ) { if( a_ChildElement is XmlElement ) { Console.WriteLine( " " + ((XmlElement)a_ChildElement).Name ); } } } }
foreach( XmlElement a_Element in new XmlElementEnumerator( a_XmlDoc.DocumentElement ) ) { Console.WriteLine( a_Element.Name ); foreach( XmlElement a_ChildElement in new XmlElementEnumerator( a_Element ) ) { Console.WriteLine( " " + a_ChildElement.Name ); } }
| Object | |
| XmlUtils..::XmlElementEnumerator | |