XmlUtil

From auWiki
Revision as of 08:02, 19 July 2007 by Misterhaan (talk | contribs) (New page: {{RightTOC}} C# class that provides static functions for working with XML. =====Namespace===== au.util.io =====Hierarchy===== * System.Object ** au.util.io.XmlUtil ==Usage== ==Publ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

C# class that provides static functions for working with XML.

Namespace

au.util.io

Hierarchy
  • System.Object
    • au.util.io.XmlUtil

Usage

Public Methods

XMLEncode

static string XMLEncode(string s)

Encode a string to work with HTML or XML.

  • s = String to encode.
  • @return = Encoded string.

AddElement

static XmlElement AddElement(XmlNode parent, string name, object innerText)

static XmlElement AddElement(XmlNode parent, string name, string innerText)

static XmlElement AddElement(XmlNode parent, string name)

Add a new XML element as a child of another node.

  • parent = Node to add new element under.
  • name = Name of new element.
  • innerText = Text to add with new element.
  • @return = New element.

AddAttribute

static XmlAttribute AddAttribute(XmlElement el, string name, object val)

static XmlAttribute AddAttribute(XmlElement el, string name, string val)

Add an attribute to an XML element

  • el = XML Element to add an attribute to.
  • name = Name of attribute to add.
  • val = Value of attribute to add.
  • @return = New attribute.