IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Base class for various utilities operating on XmlDocumnt. More...
Public Member Functions | |
virtual void | SetDocument (XmlDataDocument doc) |
virtual void | Load (string filename) |
virtual void | LoadXml (string docstr) |
Static Public Member Functions | |
static string | GetDefaultNameSpaceUri (XmlElement element) |
Gets the default namespace URI if defined, for the specified Xml element. | |
static string | GetDefaultNameSpaceUri (XmlDocument doc) |
Gets the default namespace URI of teh Xml document. | |
static string | GetDefaultNameSpaceUri (XmlNode node) |
Returns the default namespace URI that applies to the specified Xml node. | |
static string | GetNameSpaceUri (XmlDocument doc, string prefix) |
Returns the namespace URI associated with a specific prefix that applies to the specified Xml document. | |
static string | GetNameSpaceUri (XmlNode node, string prefix) |
Returns the namespace URI associated with a specific prefix that applies to the specified Xml document. | |
Public Attributes | |
string | DefaultNameSpace = null |
string | DefaultNameSpacePrefix = "defaultnsprefix" |
Protected Member Functions | |
bool | ContainedInDocument (XmlNode node, XmlDocument doc) |
Returns true if an Xml node is contained in the specified Xml document (false if any is null). | |
bool | ContainedInNode (XmlNode node, XmlNode container) |
Returns null if an XML node (first argument) is contained in the specified note (second argument). The node can be contained in another node at an arbitrary depth for the function to return true. If any of the _gridCoordinates is null then the function returns false. | |
Properties | |
virtual IG.Lib.IReporter | R [get] |
Reporter for this class. | |
virtual bool | HasDefaultNameSpace [get, set] |
string | FileName [get, set] |
virtual XmlDocument | Doc [get, set] |
Xml document that represents the message. | |
XmlNode | Root [get, set] |
Root node of the current document. | |
Static Private Member Functions | |
static string | GetNamespaceAttributeName (string prefix) |
static string | GetNameSpaceUri0 (XmlElement element, string NamespaceAttributeName) |
Gets the namespace URI introduced by a particular attribute, if defined, for the specified Xml element. | |
static string | GetNameSpaceUri (XmlElement element, string prefix) |
Returns the namespace URI associated with a specific prefix that applies to the specified Xml element. URI information is obtained from the corresponding attribute of the specified node and eventually its parent _gridCoordinates. | |
Private Attributes | |
bool | _hasDefaultNameSpace = false |
const string | XmlNsAttribute = "xmlns" |
string | _filename = null |
XmlDocument | _doc = null |
XmlNode | _root = null |
Base class for various utilities operating on XmlDocumnt.
static string IG::Lib::XmlUtilityBase::GetDefaultNameSpaceUri | ( | XmlElement | element | ) | [inline, static] |
Gets the default namespace URI if defined, for the specified Xml element.
element |
static string IG::Lib::XmlUtilityBase::GetDefaultNameSpaceUri | ( | XmlDocument | doc | ) | [inline, static] |
static string IG::Lib::XmlUtilityBase::GetDefaultNameSpaceUri | ( | XmlNode | node | ) | [inline, static] |
static string IG::Lib::XmlUtilityBase::GetNamespaceAttributeName | ( | string | prefix | ) | [inline, static, private] |
static string IG::Lib::XmlUtilityBase::GetNameSpaceUri0 | ( | XmlElement | element, |
string | NamespaceAttributeName | ||
) | [inline, static, private] |
Gets the namespace URI introduced by a particular attribute, if defined, for the specified Xml element.
element | Element for which rhe specific namespace URI is searched for. |
NamespaceAttributeName | Attribute name that introduces that namespace. |
static string IG::Lib::XmlUtilityBase::GetNameSpaceUri | ( | XmlElement | element, |
string | prefix | ||
) | [inline, static, private] |
Returns the namespace URI associated with a specific prefix that applies to the specified Xml element. URI information is obtained from the corresponding attribute of the specified node and eventually its parent _gridCoordinates.
element | Element for which namespace URI is searched for. |
prefix | Prefix for which teh namespace is searched for. If null or empty string then a default namespace URI is searched for. |
static string IG::Lib::XmlUtilityBase::GetNameSpaceUri | ( | XmlDocument | doc, |
string | prefix | ||
) | [inline, static] |
static string IG::Lib::XmlUtilityBase::GetNameSpaceUri | ( | XmlNode | node, |
string | prefix | ||
) | [inline, static] |
virtual void IG::Lib::XmlUtilityBase::SetDocument | ( | XmlDataDocument | doc | ) | [inline, virtual] |
virtual void IG::Lib::XmlUtilityBase::Load | ( | string | filename | ) | [inline, virtual] |
virtual void IG::Lib::XmlUtilityBase::LoadXml | ( | string | docstr | ) | [inline, virtual] |
bool IG::Lib::XmlUtilityBase::ContainedInDocument | ( | XmlNode | node, |
XmlDocument | doc | ||
) | [inline, protected] |
bool IG::Lib::XmlUtilityBase::ContainedInNode | ( | XmlNode | node, |
XmlNode | container | ||
) | [inline, protected] |
Returns null if an XML node (first argument) is contained in the specified note (second argument). The node can be contained in another node at an arbitrary depth for the function to return true. If any of the _gridCoordinates is null then the function returns false.
node | Node that might be contained in another node. |
container | The node that might contain another node. |
bool IG::Lib::XmlUtilityBase::_hasDefaultNameSpace = false [private] |
string IG::Lib::XmlUtilityBase::DefaultNameSpace = null |
string IG::Lib::XmlUtilityBase::DefaultNameSpacePrefix = "defaultnsprefix" |
const string IG::Lib::XmlUtilityBase::XmlNsAttribute = "xmlns" [private] |
string IG::Lib::XmlUtilityBase::_filename = null [private] |
XmlDocument IG::Lib::XmlUtilityBase::_doc = null [private] |
XmlNode IG::Lib::XmlUtilityBase::_root = null [private] |
virtual IG.Lib.IReporter IG::Lib::XmlUtilityBase::R [get] |
Reporter for this class.
virtual bool IG::Lib::XmlUtilityBase::HasDefaultNameSpace [get, set] |
string IG::Lib::XmlUtilityBase::FileName [get, set] |
virtual XmlDocument IG::Lib::XmlUtilityBase::Doc [get, set] |
Xml document that represents the message.
Reimplemented in IG::Lib::XmlParser.
XmlNode IG::Lib::XmlUtilityBase::Root [get, set] |
Root node of the current document.