C# Class ReasonCodeExample.XPathInformation.XmlRepository

Exibir arquivo Open project: uli-weltersbach/XPathInformation

Public Methods

Method Description
GetAttribute ( System.Xml.Linq.XElement element, int lineNumber, int linePosition ) : System.Xml.Linq.XAttribute
GetElement ( System.Xml.Linq.XElement rootElement, int lineNumber, int linePosition ) : System.Xml.Linq.XElement

Gets the XML node located at the specified line and position.

GetNodeCount ( XObject xml, string xpath ) : int?
GetRootElement ( ) : System.Xml.Linq.XElement
GetSelected ( ) : XObject
LoadXml ( string xml ) : void
SetSelected ( XObject obj ) : void

Private Methods

Method Description
GetAttribute ( IEnumerable elements, int lineNumber, int linePosition ) : System.Xml.Linq.XAttribute
IsCorrectLine ( IXmlLineInfo lineInfo, int lineNumber ) : bool
IsCorrectPosition ( IXmlLineInfo lineInfo, int linePosition ) : bool

Method Details

GetAttribute() public method

public GetAttribute ( System.Xml.Linq.XElement element, int lineNumber, int linePosition ) : System.Xml.Linq.XAttribute
element System.Xml.Linq.XElement
lineNumber int
linePosition int
return System.Xml.Linq.XAttribute

GetElement() public method

Gets the XML node located at the specified line and position.
public GetElement ( System.Xml.Linq.XElement rootElement, int lineNumber, int linePosition ) : System.Xml.Linq.XElement
rootElement System.Xml.Linq.XElement The root element.
lineNumber int One-based line number.
linePosition int /// One-based line position. The line position of an XML element is equal to the position /// of the first character in its name, not the position of the opening angle bracket. /// E.g. the XML fragment "<element />" has line position 2. ///
return System.Xml.Linq.XElement

GetNodeCount() public method

public GetNodeCount ( XObject xml, string xpath ) : int?
xml XObject
xpath string
return int?

GetRootElement() public method

public GetRootElement ( ) : System.Xml.Linq.XElement
return System.Xml.Linq.XElement

GetSelected() public method

public GetSelected ( ) : XObject
return XObject

LoadXml() public method

public LoadXml ( string xml ) : void
xml string
return void

SetSelected() public method

public SetSelected ( XObject obj ) : void
obj XObject
return void