C# 클래스 HandCoded.Xml.DOM

The DOM class contains utility functions that operate on a DOM tree, often combining several simpler operations or returning a more useful type.
파일 보기 프로젝트 열기: formicary/fpml-toolkit-csharp 1 사용 예제들

공개 메소드들

메소드 설명
GetAttribute ( XmlElement context, string name ) : string

Gets the value of the specified attribute on the indicated context XmlElement. Note that this method returns null if the attribute is not present compared to the DOM function which returns a empty string.

GetChildElements ( XmlElement parent ) : XmlNodeList

Locates all the child elements of the given parent XmlElement and returns them in a (possibly empty) XmlNodeList.

GetElementByLocalName ( XmlElement parent, string localName ) : XmlElement

Locates the first child XmlElement of the indicated parent that matches the given local name string, ignoring prefixes and namespaces.

GetElementsByLocalName ( XmlElement parent, string localName ) : XmlNodeList

Locates all the child XmlElement instances of the indicated parent that match the given local name string, ignoring prefixes and namespaces.

GetFirstChild ( XmlElement parent ) : XmlElement

Finds the first child element of the given XmlElement skipping any intermediate non-element XmlNode instances.

GetLastChild ( XmlElement parent ) : XmlElement

Finds the last child element of the given XmlElement skipping any intermediate non-element XmlNode instances.

GetNextSibling ( XmlElement element ) : XmlElement

Finds the next sibling element of the given XmlElement skipping any intermediate non-element XmlNode instances.

GetParent ( XmlElement element ) : XmlElement

Finds the parent XmlElement of the given node.

GetPreviousSibling ( XmlElement element ) : XmlElement

Finds the previous sibling element of the given XmlElement skipping any intermediate non-element XmlNode instances.

HasChildNodes ( XmlElement element ) : bool

Determines if the given XmlElement has at least one child element.

SetAttribute ( XmlElement context, string name, string value ) : void

Sets the value of specified attribute on the indicated context XmlElement. If the value is null then the attribute is removed.

비공개 메소드들

메소드 설명
DOM ( ) : System

Ensures no instances can be constructed.

메소드 상세

GetAttribute() 공개 정적인 메소드

Gets the value of the specified attribute on the indicated context XmlElement. Note that this method returns null if the attribute is not present compared to the DOM function which returns a empty string.
public static GetAttribute ( XmlElement context, string name ) : string
context System.Xml.XmlElement The context .
name string The attribute name.
리턴 string

GetChildElements() 공개 정적인 메소드

Locates all the child elements of the given parent XmlElement and returns them in a (possibly empty) XmlNodeList.
public static GetChildElements ( XmlElement parent ) : XmlNodeList
parent System.Xml.XmlElement The parent .
리턴 System.Xml.XmlNodeList

GetElementByLocalName() 공개 정적인 메소드

Locates the first child XmlElement of the indicated parent that matches the given local name string, ignoring prefixes and namespaces.
public static GetElementByLocalName ( XmlElement parent, string localName ) : XmlElement
parent System.Xml.XmlElement The parent .
localName string The required element local name string.
리턴 System.Xml.XmlElement

GetElementsByLocalName() 공개 정적인 메소드

Locates all the child XmlElement instances of the indicated parent that match the given local name string, ignoring prefixes and namespaces.
public static GetElementsByLocalName ( XmlElement parent, string localName ) : XmlNodeList
parent System.Xml.XmlElement The parent .
localName string The required element local name string.
리턴 System.Xml.XmlNodeList

GetFirstChild() 공개 정적인 메소드

Finds the first child element of the given XmlElement skipping any intermediate non-element XmlNode instances.
public static GetFirstChild ( XmlElement parent ) : XmlElement
parent System.Xml.XmlElement The parent .
리턴 System.Xml.XmlElement

GetLastChild() 공개 정적인 메소드

Finds the last child element of the given XmlElement skipping any intermediate non-element XmlNode instances.
public static GetLastChild ( XmlElement parent ) : XmlElement
parent System.Xml.XmlElement The parent .
리턴 System.Xml.XmlElement

GetNextSibling() 공개 정적인 메소드

Finds the next sibling element of the given XmlElement skipping any intermediate non-element XmlNode instances.
public static GetNextSibling ( XmlElement element ) : XmlElement
element System.Xml.XmlElement The context .
리턴 System.Xml.XmlElement

GetParent() 공개 정적인 메소드

Finds the parent XmlElement of the given node.
public static GetParent ( XmlElement element ) : XmlElement
element System.Xml.XmlElement The context .
리턴 System.Xml.XmlElement

GetPreviousSibling() 공개 정적인 메소드

Finds the previous sibling element of the given XmlElement skipping any intermediate non-element XmlNode instances.
public static GetPreviousSibling ( XmlElement element ) : XmlElement
element System.Xml.XmlElement The context .
리턴 System.Xml.XmlElement

HasChildNodes() 공개 정적인 메소드

Determines if the given XmlElement has at least one child element.
public static HasChildNodes ( XmlElement element ) : bool
element System.Xml.XmlElement The context .
리턴 bool

SetAttribute() 공개 정적인 메소드

Sets the value of specified attribute on the indicated context XmlElement. If the value is null then the attribute is removed.
public static SetAttribute ( XmlElement context, string name, string value ) : void
context System.Xml.XmlElement The context .
name string The attribute name.
value string The new value or null.
리턴 void