XmlStateWriter Class
A OnlineXmlWriter that tracks its state

Inheritance Hierarchy

OnlineSystem Object
  OnlineSystem.Xml XmlWriter
    MARC.Everest.Xml XmlStateWriter

Namespace: MARC.Everest.Xml
Assembly: MARC.Everest.Phone (in MARC.Everest.Phone.dll) Version: 1.5.0.0 (1.5.0)

Syntax

C#

public class XmlStateWriter : XmlWriter

Examples

The following example illustrates the use of the XmlStateWriter

Getting the current path

Stream s = Console.OpenStandardOutput();
XmlStateWriter writer = new XmlStateWriter(XmlWriter.Create(s));

// Write the start of an HTML document
writer.WriteStartElement("html");
writer.WriteStartElement("body");

// currentPath will be "/html/body" 
string currentPath = writer.CurrentPath; 

writer.WriteStartElement("p"); 
// currentPath will be "/html/body/p"
currentPath = writer.CurrentPath; 

writer.WriteEndElement();
writer.WriteEndElement();
// currentPath will be "/html"
currentPath = writer.CurrentPath;

writer.WriteEndElement();

Version Information

Everest Compact Framework

Supported in: 1.2 Compact

Everest Framework

Supported in: 1.2, 1.0

See Also