Class DOMUtils
Helper methods for parsing XML
Assembly: Lucene.Net.QueryParser.dll
Syntax
public static class DOMUtils
Methods
GetAttribute(XmlElement, string, bool)
Helper methods for parsing XML
Declaration
public static bool GetAttribute(XmlElement element, string attributeName, bool deflt)
Parameters
Returns
GetAttribute(XmlElement, string, int)
Helper methods for parsing XML
Declaration
public static int GetAttribute(XmlElement element, string attributeName, int deflt)
Parameters
Returns
GetAttribute(XmlElement, string, float)
Helper methods for parsing XML
Declaration
public static float GetAttribute(XmlElement element, string attributeName, float deflt)
Parameters
Returns
GetAttribute(XmlElement, string, string)
Helper methods for parsing XML
Declaration
public static string GetAttribute(XmlElement element, string attributeName, string deflt)
Parameters
Returns
GetAttributeOrFail(XmlElement, string)
Helper methods for parsing XML
Declaration
public static string GetAttributeOrFail(XmlElement e, string name)
Parameters
Returns
GetAttributeWithInheritance(XmlElement, string)
Returns an attribute value from this node, or first parent node with this attribute defined
Declaration
public static string GetAttributeWithInheritance(XmlElement element, string attributeName)
Parameters
Returns
Type |
Description |
string |
A non-zero-length value if defined, otherwise null
|
GetAttributeWithInheritanceOrFail(XmlElement, string)
Helper methods for parsing XML
Declaration
public static string GetAttributeWithInheritanceOrFail(XmlElement e, string name)
Parameters
Returns
GetChildByTagName(XmlElement, string)
Convenience method where there is only one child XmlElement of a given name
Declaration
public static XmlElement GetChildByTagName(XmlElement e, string name)
Parameters
Returns
GetChildByTagOrFail(XmlElement, string)
Helper methods for parsing XML
Declaration
public static XmlElement GetChildByTagOrFail(XmlElement e, string name)
Parameters
Returns
GetChildTextByTagName(XmlElement, string)
Convenience method where there is only one child XmlElement of a given name
Declaration
public static string GetChildTextByTagName(XmlElement e, string tagName)
Parameters
Returns
GetFirstChildElement(XmlElement)
Helper methods for parsing XML
Declaration
public static XmlElement GetFirstChildElement(XmlElement element)
Parameters
Returns
GetFirstChildOrFail(XmlElement)
Helper methods for parsing XML
Declaration
public static XmlElement GetFirstChildOrFail(XmlElement e)
Parameters
Returns
GetNonBlankTextOrFail(XmlElement)
Helper methods for parsing XML
Declaration
public static string GetNonBlankTextOrFail(XmlElement e)
Parameters
Returns
GetText(XmlNode)
Helper methods for parsing XML
Declaration
public static string GetText(XmlNode e)
Parameters
Returns
InsertChild(XmlElement, string, string)
Convenience method to append a new child with text
Declaration
public static XmlElement InsertChild(XmlElement parent, string tagName, string text)
Parameters
Returns
LoadXML(Stream)
Helper method to parse an XML file into a DOM tree, given a Stream.
Declaration
public static XmlDocument LoadXML(Stream input)
Parameters
Type |
Name |
Description |
Stream |
input |
reader of the XML file to be parsed
|
Returns
LoadXML(TextReader)
Helper method to parse an XML file into a DOM tree, given a TextReader.
Declaration
public static XmlDocument LoadXML(TextReader input)
Parameters
Type |
Name |
Description |
TextReader |
input |
reader of the XML file to be parsed
|
Returns
LoadXML(XmlReader)
Helper method to parse an XML file into a DOM tree, given an XmlReader.
Declaration
public static XmlDocument LoadXML(XmlReader input)
Parameters
Type |
Name |
Description |
XmlReader |
input |
reader of the XML file to be parsed
|
Returns