C# Class Lucene.Net.QueryParsers.Xml.DOMUtils

Helper methods for parsing XML
Mostrar archivo Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
GetAttribute ( XmlElement element, string attributeName, bool deflt ) : bool
GetAttribute ( XmlElement element, string attributeName, float deflt ) : float
GetAttribute ( XmlElement element, string attributeName, int deflt ) : int
GetAttribute ( XmlElement element, string attributeName, string deflt ) : string
GetAttributeOrFail ( XmlElement e, string name ) : string
GetAttributeWithInheritance ( XmlElement element, string attributeName ) : string

Returns an attribute value from this node, or first parent node with this attribute defined

GetAttributeWithInheritanceOrFail ( XmlElement e, string name ) : string
GetChildByTagName ( XmlElement e, string name ) : XmlElement

Convenience method where there is only one child XmlElement of a given name

GetChildByTagOrFail ( XmlElement e, string name ) : XmlElement
GetChildTextByTagName ( XmlElement e, string tagName ) : string

Convenience method where there is only one child XmlElement of a given name

GetFirstChildElement ( XmlElement element ) : XmlElement
GetFirstChildOrFail ( XmlElement e ) : XmlElement
GetNonBlankTextOrFail ( XmlElement e ) : string
GetText ( XmlNode e ) : string
InsertChild ( XmlElement parent, string tagName, string text ) : XmlElement

Convenience method to append a new child with text

LoadXML ( Stream input ) : XmlDocument

Helper method to parse an XML file into a DOM tree, given a Stream.

LoadXML ( TextReader input ) : XmlDocument

Helper method to parse an XML file into a DOM tree, given a TextReader.

LoadXML ( XmlReader input ) : XmlDocument

Helper method to parse an XML file into a DOM tree, given an XmlReader.

Private Methods

Method Description
GetTextBuffer ( XmlNode e, StringBuilder sb ) : void

Method Details

GetAttribute() public static method

public static GetAttribute ( XmlElement element, string attributeName, bool deflt ) : bool
element System.Xml.XmlElement
attributeName string
deflt bool
return bool

GetAttribute() public static method

public static GetAttribute ( XmlElement element, string attributeName, float deflt ) : float
element System.Xml.XmlElement
attributeName string
deflt float
return float

GetAttribute() public static method

public static GetAttribute ( XmlElement element, string attributeName, int deflt ) : int
element System.Xml.XmlElement
attributeName string
deflt int
return int

GetAttribute() public static method

public static GetAttribute ( XmlElement element, string attributeName, string deflt ) : string
element System.Xml.XmlElement
attributeName string
deflt string
return string

GetAttributeOrFail() public static method

public static GetAttributeOrFail ( XmlElement e, string name ) : string
e System.Xml.XmlElement
name string
return string

GetAttributeWithInheritance() public static method

Returns an attribute value from this node, or first parent node with this attribute defined
public static GetAttributeWithInheritance ( XmlElement element, string attributeName ) : string
element System.Xml.XmlElement
attributeName string
return string

GetAttributeWithInheritanceOrFail() public static method

public static GetAttributeWithInheritanceOrFail ( XmlElement e, string name ) : string
e System.Xml.XmlElement
name string
return string

GetChildByTagName() public static method

Convenience method where there is only one child XmlElement of a given name
public static GetChildByTagName ( XmlElement e, string name ) : XmlElement
e System.Xml.XmlElement
name string
return System.Xml.XmlElement

GetChildByTagOrFail() public static method

public static GetChildByTagOrFail ( XmlElement e, string name ) : XmlElement
e System.Xml.XmlElement
name string
return System.Xml.XmlElement

GetChildTextByTagName() public static method

Convenience method where there is only one child XmlElement of a given name
public static GetChildTextByTagName ( XmlElement e, string tagName ) : string
e System.Xml.XmlElement
tagName string
return string

GetFirstChildElement() public static method

public static GetFirstChildElement ( XmlElement element ) : XmlElement
element System.Xml.XmlElement
return System.Xml.XmlElement

GetFirstChildOrFail() public static method

public static GetFirstChildOrFail ( XmlElement e ) : XmlElement
e System.Xml.XmlElement
return System.Xml.XmlElement

GetNonBlankTextOrFail() public static method

public static GetNonBlankTextOrFail ( XmlElement e ) : string
e System.Xml.XmlElement
return string

GetText() public static method

public static GetText ( XmlNode e ) : string
e System.Xml.XmlNode
return string

InsertChild() public static method

Convenience method to append a new child with text
public static InsertChild ( XmlElement parent, string tagName, string text ) : XmlElement
parent System.Xml.XmlElement
tagName string
text string
return System.Xml.XmlElement

LoadXML() public static method

Helper method to parse an XML file into a DOM tree, given a Stream.
public static LoadXML ( Stream input ) : XmlDocument
input Stream reader of the XML file to be parsed
return System.Xml.XmlDocument

LoadXML() public static method

Helper method to parse an XML file into a DOM tree, given a TextReader.
public static LoadXML ( TextReader input ) : XmlDocument
input TextReader reader of the XML file to be parsed
return System.Xml.XmlDocument

LoadXML() public static method

Helper method to parse an XML file into a DOM tree, given an XmlReader.
public static LoadXML ( XmlReader input ) : XmlDocument
input XmlReader reader of the XML file to be parsed
return System.Xml.XmlDocument