| IGLib 1.6.0 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | Static Private Member Functions | Private Attributes | List of all members
IG.Lib.XmlUtilityBase Class Reference

Base class for various utilities operating on XmlDocumnt. More...

Inheritance diagram for IG.Lib.XmlUtilityBase:
[legend]

## 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. More...
static string | GetDefaultNameSpaceUri (XmlDocument doc)
| Gets the default namespace URI of teh Xml document. More...
static string | GetDefaultNameSpaceUri (XmlNode node)
| Returns the default namespace URI that applies to the specified Xml node. More...
static string | GetNameSpaceUri (XmlDocument doc, string prefix)
| Returns the namespace URI associated with a specific prefix that applies to the specified Xml document. More...
static string | GetNameSpaceUri (XmlNode node, string prefix)
| Returns the namespace URI associated with a specific prefix that applies to the specified Xml document. More...

## 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). More...
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. More...

## Properties
virtual IG.Lib.IReporter | R`[get]`
| Reporter for this class. More...
virtual bool | HasDefaultNameSpace`[get, protected set]`
string | FileName`[get, protected set]`
virtual XmlDocument | Doc`[get, set]`
| Xml document that represents the message. More...
XmlNode | Root`[get, private set]`
| Root node of the current document. More...

## 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. More...
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. More...

## Private Attributes
bool | _hasDefaultNameSpace = false
const string | XmlNsAttribute = "xmlns"
string | _filename = null
XmlDocument | _doc = null
XmlNode | _root = null

## Detailed Description

Base class for various utilities operating on XmlDocumnt.

## Member Function Documentation

static string IG.Lib.XmlUtilityBase.GetDefaultNameSpaceUri | ( | XmlElement | element | ) |
| inline static

Gets the default namespace URI if defined, for the specified Xml element.

Parameters

  element |

static string IG.Lib.XmlUtilityBase.GetDefaultNameSpaceUri | ( | XmlDocument | doc | ) |
| inline static

Gets the default namespace URI of teh Xml document.

Parameters

  doc | Xml document to which the default namespace might apply.

Returns
  Tha default namespace URI that applies to the document, or null if there is no such namespace.

static string IG.Lib.XmlUtilityBase.GetDefaultNameSpaceUri | ( | XmlNode | node | ) |
| inline static

Returns the default namespace URI that applies to the specified Xml node.

Parameters

  node | Xml node to which namespace URI applies.

Returns
  The defaulut namespace URI atht applies to the node, or null if there is no default namespace.

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.

Parameters

  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.

Parameters

  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.

Returns
  The namespace URI corresponding to the specified prefix at the level of a specified element, or null if the particular namespace URI is not defined.

static string IG.Lib.XmlUtilityBase.GetNameSpaceUri | ( | XmlDocument | doc,
|  | string | prefix
| ) |  |
| inline static

Returns the namespace URI associated with a specific prefix that applies to the specified Xml document.

Parameters

  doc | Xml document to which namespace URI applies.

Returns
  The namespace URI if found, null otherwise.

static string IG.Lib.XmlUtilityBase.GetNameSpaceUri | ( | XmlNode | node,
|  | string | prefix
| ) |  |
| inline static

Returns the namespace URI associated with a specific prefix that applies to the specified Xml document.

Parameters

  node | Xml node to which namespace URI applies.

Returns
  The namespace URI if found, null otherwise.

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

Returns true if an Xml node is contained in the specified Xml document (false if any is null).

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.

Parameters

  node | Node that might be contained in another node.
  container | The node that might contain another node.

Returns
  true if container contains node, false othwrwise.

## Member Data Documentation

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

## Property Documentation

virtual IG.Lib.IReporter IG.Lib.XmlUtilityBase.R
| get

Reporter for this class.

virtual bool IG.Lib.XmlUtilityBase.HasDefaultNameSpace
| get protected set

string IG.Lib.XmlUtilityBase.FileName
| get protected set

virtual XmlDocument IG.Lib.XmlUtilityBase.Doc
| get set

Xml document that represents the message.

XmlNode IG.Lib.XmlUtilityBase.Root
| get private set

Root node of the current document.

The documentation for this class was generated from the following file:

- igbase/0unsorted/XmlUtilities.cs