C# 클래스 Acme.Northwind.Install.XmlHelper

A helper class to manage XML documents
파일 보기 프로젝트 열기: nHydrate/nHydrate

공개 메소드들

메소드 설명
AddAttribute ( XmlElement element, string name, string value ) : XmlAttribute

Adds an attribute to an XML node

AddElement ( this element, string name ) : XmlNode

Adds a node to the XML tree

AddElement ( this element, string name, string value ) : XmlNode

Adds a node to the XML tree

AppendCData ( this writer, string tag, string data ) : void

A convenience method to append a CDATA section to an XmlTextWriter

CreatexpathNavigator ( XmlReader reader ) : XPathNavigator

Creats an XPathNavigator from an XmlReader

EnsureValidXMLValue ( string text ) : string

Strip off all invalid characters for an XML file node or attribute value

GetAttribute ( this node, string attributeName, System.Guid defaultValue ) : System.Guid

Get a node attribute value for the specified attribute name

GetAttribute ( this node, string attributeName, bool defaultValue ) : bool

Get a node attribute value for the specified attribute name

GetAttribute ( this node, string attributeName, double defaultValue ) : double

Get a node attribute value for the specified attribute name

GetAttribute ( this node, string attributeName, int defaultValue ) : int

Get a node attribute value for the specified attribute name

GetAttribute ( this node, string attributeName, long defaultValue ) : long

Get a node attribute value for the specified attribute name

GetAttribute ( this node, string attributeName ) : string

Get a node attribute value for the specified attribute name

GetAttribute ( this node, string attributeName, string defaultValue ) : string

Get a node attribute value for the specified attribute name

GetElement ( this parentElement, string tagName ) : XmlElement

GetIterator ( XPathNavigator navigator, string xPath ) : XPathNodeIterator

GetNode ( this xmlNode, string xpath ) : XmlNode

Gets a node from an XPath query

GetNode ( this xmlNode, string xpath, XmlNamespaceManager nsManager ) : XmlNode

Gets a node from an XPath query

GetNodeValue ( this element, string xpath, System.DateTime defaultValue ) : System.DateTime

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, System.DateTime defaultValue ) : DateTime?

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, System.Single defaultValue ) : System.Single

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, System.Single defaultValue ) : Single?

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, bool defaultValue ) : bool

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, bool defaultValue ) : bool?

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, double defaultValue ) : double

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, double defaultValue ) : double?

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, int defaultValue ) : int

Get a node's value based on an XPath query

GetNodeValue ( this element, string xpath, int defaultValue ) : int?

Get a node's value based on an XPath query

GetNodeValue ( this document, string xpath, XmlNamespaceManager nsManager, string defaultValue ) : string

Get a node's value based on an XPath query

GetNodeValue ( this document, string xpath, string defaultValue ) : string

Get a node's value based on an XPath query

GetNodeXML ( this document, string xpath, string defaultValue ) : string

Gets the actual XML of a node

GetNodeXML ( this document, string xpath, string defaultValue, bool useOuter ) : string

Gets the actual XML of a node

GetXmlReader ( this fileInfo ) : XmlReader

RemoveAttribute ( XmlElement element, string attributeName ) : void

Removes an attribute from a node

RemoveElement ( this element ) : void

Removes an XML node

RemoveElement ( this document, string xpath ) : void

Removes a set of nodes based on an XPath query

UpdateAttribute ( this xmlElement, string attributeName, string newValue ) : void

UpdateElement ( this xmlDocument, string xpath, string newValue ) : void

메소드 상세

AddAttribute() 공개 정적인 메소드

Adds an attribute to an XML node
public static AddAttribute ( XmlElement element, string name, string value ) : XmlAttribute
element System.Xml.XmlElement
name string
value string
리턴 System.Xml.XmlAttribute

AddElement() 공개 정적인 메소드

Adds a node to the XML tree
public static AddElement ( this element, string name ) : XmlNode
element this
name string
리턴 System.Xml.XmlNode

AddElement() 공개 정적인 메소드

Adds a node to the XML tree
public static AddElement ( this element, string name, string value ) : XmlNode
element this
name string
value string
리턴 System.Xml.XmlNode

AppendCData() 공개 정적인 메소드

A convenience method to append a CDATA section to an XmlTextWriter
public static AppendCData ( this writer, string tag, string data ) : void
writer this
tag string
data string
리턴 void

CreatexpathNavigator() 공개 정적인 메소드

Creats an XPathNavigator from an XmlReader
public static CreatexpathNavigator ( XmlReader reader ) : XPathNavigator
reader XmlReader
리턴 System.Xml.XPath.XPathNavigator

EnsureValidXMLValue() 공개 정적인 메소드

Strip off all invalid characters for an XML file node or attribute value
public static EnsureValidXMLValue ( string text ) : string
text string The text to clean
리턴 string

GetAttribute() 공개 정적인 메소드

Get a node attribute value for the specified attribute name
public static GetAttribute ( this node, string attributeName, System.Guid defaultValue ) : System.Guid
node this
attributeName string
defaultValue System.Guid
리턴 System.Guid

GetAttribute() 공개 정적인 메소드

Get a node attribute value for the specified attribute name
public static GetAttribute ( this node, string attributeName, bool defaultValue ) : bool
node this
attributeName string
defaultValue bool
리턴 bool

GetAttribute() 공개 정적인 메소드

Get a node attribute value for the specified attribute name
public static GetAttribute ( this node, string attributeName, double defaultValue ) : double
node this
attributeName string
defaultValue double
리턴 double

GetAttribute() 공개 정적인 메소드

Get a node attribute value for the specified attribute name
public static GetAttribute ( this node, string attributeName, int defaultValue ) : int
node this
attributeName string
defaultValue int
리턴 int

GetAttribute() 공개 정적인 메소드

Get a node attribute value for the specified attribute name
public static GetAttribute ( this node, string attributeName, long defaultValue ) : long
node this
attributeName string
defaultValue long
리턴 long

GetAttribute() 공개 정적인 메소드

Get a node attribute value for the specified attribute name
public static GetAttribute ( this node, string attributeName ) : string
node this
attributeName string
리턴 string

GetAttribute() 공개 정적인 메소드

Get a node attribute value for the specified attribute name
public static GetAttribute ( this node, string attributeName, string defaultValue ) : string
node this
attributeName string
defaultValue string
리턴 string

GetElement() 공개 정적인 메소드

public static GetElement ( this parentElement, string tagName ) : XmlElement
parentElement this
tagName string
리턴 System.Xml.XmlElement

GetIterator() 공개 정적인 메소드

public static GetIterator ( XPathNavigator navigator, string xPath ) : XPathNodeIterator
navigator System.Xml.XPath.XPathNavigator
xPath string
리턴 System.Xml.XPath.XPathNodeIterator

GetNode() 공개 정적인 메소드

Gets a node from an XPath query
public static GetNode ( this xmlNode, string xpath ) : XmlNode
xmlNode this
xpath string
리턴 System.Xml.XmlNode

GetNode() 공개 정적인 메소드

Gets a node from an XPath query
public static GetNode ( this xmlNode, string xpath, XmlNamespaceManager nsManager ) : XmlNode
xmlNode this
xpath string
nsManager System.Xml.XmlNamespaceManager
리턴 System.Xml.XmlNode

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, System.DateTime defaultValue ) : System.DateTime
element this
xpath string
defaultValue System.DateTime
리턴 System.DateTime

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, System.DateTime defaultValue ) : DateTime?
element this
xpath string
defaultValue System.DateTime
리턴 DateTime?

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, System.Single defaultValue ) : System.Single
element this
xpath string
defaultValue System.Single
리턴 System.Single

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, System.Single defaultValue ) : Single?
element this
xpath string
defaultValue System.Single
리턴 Single?

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, bool defaultValue ) : bool
element this
xpath string
defaultValue bool
리턴 bool

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, bool defaultValue ) : bool?
element this
xpath string
defaultValue bool
리턴 bool?

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, double defaultValue ) : double
element this
xpath string
defaultValue double
리턴 double

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, double defaultValue ) : double?
element this
xpath string
defaultValue double
리턴 double?

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, int defaultValue ) : int
element this
xpath string
defaultValue int
리턴 int

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this element, string xpath, int defaultValue ) : int?
element this
xpath string
defaultValue int
리턴 int?

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this document, string xpath, XmlNamespaceManager nsManager, string defaultValue ) : string
document this
xpath string
nsManager System.Xml.XmlNamespaceManager
defaultValue string
리턴 string

GetNodeValue() 공개 정적인 메소드

Get a node's value based on an XPath query
public static GetNodeValue ( this document, string xpath, string defaultValue ) : string
document this
xpath string
defaultValue string
리턴 string

GetNodeXML() 공개 정적인 메소드

Gets the actual XML of a node
public static GetNodeXML ( this document, string xpath, string defaultValue ) : string
document this
xpath string
defaultValue string
리턴 string

GetNodeXML() 공개 정적인 메소드

Gets the actual XML of a node
public static GetNodeXML ( this document, string xpath, string defaultValue, bool useOuter ) : string
document this
xpath string
defaultValue string
useOuter bool
리턴 string

GetXmlReader() 공개 정적인 메소드

public static GetXmlReader ( this fileInfo ) : XmlReader
fileInfo this
리턴 XmlReader

RemoveAttribute() 공개 정적인 메소드

Removes an attribute from a node
public static RemoveAttribute ( XmlElement element, string attributeName ) : void
element XmlElement
attributeName string
리턴 void

RemoveElement() 공개 정적인 메소드

Removes an XML node
public static RemoveElement ( this element ) : void
element this
리턴 void

RemoveElement() 공개 정적인 메소드

Removes a set of nodes based on an XPath query
public static RemoveElement ( this document, string xpath ) : void
document this
xpath string
리턴 void

UpdateAttribute() 공개 정적인 메소드

public static UpdateAttribute ( this xmlElement, string attributeName, string newValue ) : void
xmlElement this
attributeName string
newValue string
리턴 void

UpdateElement() 공개 정적인 메소드

public static UpdateElement ( this xmlDocument, string xpath, string newValue ) : void
xmlDocument this
xpath string
newValue string
리턴 void