Import std.data.xml_reader
XmlReader
class
Public Class XmlReader
Reads an XML document as a stream of events: a start and an end for each element, and one for each run of text, CDATA section, comment, and processing instruction.
Examples
Local reader = XmlReader("<a x=\"1\">hi</a>")
Local kinds: XmlEventKind[] = []
Local event = Try reader.Next()
While event != Null
kinds.Add(event.Kind)
event = Try reader.Next()
End While
Expect(kinds == [XmlEventKind.START, XmlEventKind.TEXT, XmlEventKind.END])std/data/xml_reader.fb, line 78
-
A reader of
text's document, its line ends LFs, and past a byte order mark at its start. -
The next event, or Null at the document's end. Throws a ParseError, with its line and column, of UNEXPECTED_END for a document that ends inside an element or markup, and of SYNTAX for the rest that isn't well-formed XML 1.0.
Report an issue with this page or with FutureBlitz on GitHub.