static XmlReader create(char[] inputUri, XmlReaderSettings settings = cast(XmlReaderSettings)null, XmlParserContext context = cast(XmlParserContext)null);
- Creates a new XmlReader instance with the specified URI, XmlReaderSettings and XmlParserContext objects.
static XmlReader create(Stream input, XmlReaderSettings settings = cast(XmlReaderSettings)null, XmlParserContext context = cast(XmlParserContext)null);
- Creates a new XmlReader instance with the specified stream, XmlReaderSettings and XmlParserContext objects.
static XmlReader create(Stream input, XmlReaderSettings settings, char[] baseUri);
- Creates a new XmlReader instance with the specified stream, XmlReaderSettings and base URI.
abstract void close();
- Closes the reader.
abstract bool read();
- Reads the next node from the stream.
Returns
true if the next node was read successfully; false if there are no more nodes to read.
void readStartElement(char[] localName, char[] ns);
void readStartElement(char[] name);
void readStartElement();
- Checks that the current node is an element and advances the reader to the next node.
Parameters
char[] localName
The local name of the element.
name
The qualified name of the element.
char[] ns
The namespace URI of the element.
void readEndElement();
- Checks that the current content node is an end tag and advances the reader to the next node.
char[] readElementString(char[] localName, char[] ns);
char[] readElementString(char[] name);
char[] readElementString();
- Reads a text-only element.
Parameters
char[] localName
The local name of the element.
name
The qualified name of the element.
char[] ns
The namespace URI of the element.
bool readToDescendant(char[] localName, char[] namespaceURI);
bool readToDescendant(char[] name);
- Advances the XmlReader to the next descendant element.
localName = The local name of the element.
name = The qualified name of the element.
namespaceURI = The namespace URI of the element.
bool readToFollowing(char[] localName, char[] namespaceURI);
bool readToFollowing(char[] name);
- Reads until the named element is found.
localName = The local name of the element.
name = The qualified name of the element.
namespaceURI = The namespace URI of the element.
bool readToNextSibling(char[] localName, char[] namespaceURI);
bool readToNextSibling(char[] name);
- Advances the XmlReader to the next sibling element.
localName = The local name of the element.
name = The qualified name of the element.
namespaceURI = The namespace URI of the element.
XmlNodeType moveToContent();
- If the current node is not a content node, the reader skips ahead to the next content node or end of file.
char[] readString();
- Reads the contents of an element or text node.
Returns
The contents of an element.
void skip();
- Skips the children of the current node.
abstract bool moveToFirstAttribute();
- Moves to the first attribute.
Returns
true if an attribute exists; otherwise, false.
abstract bool moveToNextAttribute();
- Moves to the next attribute.
Returns
true if there is a next attribute; otherwise, false.
abstract bool moveToAttribute(char[] localName, char[] namespaceURI);
abstract bool moveToAttribute(char[] name);
- Moves to the specified attribute.
Parameters
char[] localName
The local name of the element.
name
The qualified name of the element.
char[] namespaceURI
The namespace URI of the element.
Returns
true if the attribute is found; otherwise, false.
abstract bool moveToElement();
- Moves to the element that contains the current attribute node.
Returns
true if the reader is positioned on an attribute; otherwise, false.
abstract char[] getAttribute(char[] localName, char[] namespaceURI);
abstract char[] getAttribute(char[] name);
- Gets the value of an attribute.
Parameters
char[] localName
The local name of the element.
name
The qualified name of the element.
char[] namespaceURI
The namespace URI of the element.
Returns
The value of the specified attribute.
abstract XmlReadState readState();
- Gets the state of the reader.
abstract int depth();
- Gets the depth of the current node in the XML document.
abstract bool isEOF();
- Gets a value indicating whether the reader is positioned at the end of the stream.
abstract bool isEmptyElement();
- Gets a value indicating whether the current node is an empty element.
bool isDefault();
- Gets a value indicating whether the current node is an attribute generated from the default value defined in the DTD or schema.
abstract XmlNodeType nodeType();
- Gets the type of the current node.
abstract char[] baseURI();
- Gets the base URI of the current node.
abstract char[] name();
- Gets the qualified name of the current node.
abstract char[] prefix();
- Gets the namespace prefix of the current node.
abstract char[] localName();
- Gets the local name of the current node.
abstract char[] namespaceURI();
- Gets the namespace URI of the current node.
abstract bool hasValue();
- Gets a value indicating whether the current node has a value.
abstract char[] value();
- Gets the text value of the current node.
bool hasAttributes();
- Gets a value indicating whether the current node has any attributes.
abstract int attributeCount();
- Gets the number of attributes on the current node.
abstract int lineNumber();
abstract int linePosition();
char[] opIndex(char[] localName, char[] namespaceURI);
char[] opIndex(char[] name);
- Gets the value of the attribute.
Parameters
char[] localName
The local name of the element.
name
The qualified name of the element.
char[] namespaceURI
The namespace URI of the element.
Returns
The value of the specified attribute.