Search Results for

    Show / Hide Table of Contents

    Struct XMLElement

    A lightweight XML element tree; models the Desc() field of StreamInfo.

    Has a name and can have multiple named children or have text content as value; attributes are omitted. Insider note: The interface is modeled after a subset of pugixml's node type and is compatible with it.

    Namespace: LSL4Unity
    Assembly: cs.temp.dll.dll
    Syntax
    public struct XMLElement
    Remarks

    See Also : http://pugixml.googlecode.com/svn/tags/latest/docs/manual/access.html.

    Constructors

    XMLElement(IntPtr)

    Initializes a new instance of XMLElement struct.

    Declaration
    public XMLElement(IntPtr handle)
    Parameters
    Type Name Description
    IntPtr handle

    The handle.

    Methods

    AppendChild(String)

    Append a child element with the specified name.

    Declaration
    public XMLElement AppendChild(string name)
    Parameters
    Type Name Description
    String name

    The child name.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    AppendChildValue(String, String)

    Append a child node with a given name, which has a (nameless) plain-text child with the given text value.

    Declaration
    public XMLElement AppendChildValue(string name, string value)
    Parameters
    Type Name Description
    String name

    The child name.

    String value

    The child value.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    AppendCopy(XMLElement)

    Append a copy of the specified element as a child.

    Declaration
    public XMLElement AppendCopy(XMLElement e)
    Parameters
    Type Name Description
    XMLElement e

    The element to copy.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    Child(String)

    Get a child with a specified name.

    Declaration
    public XMLElement Child(string name)
    Parameters
    Type Name Description
    String name

    The child name.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    ChildValue()

    Get child value (value of the first child that is text).

    Declaration
    public string ChildValue()
    Returns
    Type Description
    String

    the child value as string.

    ChildValue(String)

    Get child value of a child with a specified name.

    Declaration
    public string ChildValue(string name)
    Parameters
    Type Name Description
    String name

    The child name.

    Returns
    Type Description
    String

    the child value as string.

    Empty()

    Whether this node is empty.

    Declaration
    public bool Empty()
    Returns
    Type Description
    Boolean

    true or false.

    FirstChild()

    Get the first child of the element.

    Declaration
    public XMLElement FirstChild()
    Returns
    Type Description
    XMLElement

    New XMLElement.

    IsText()

    Whether this is a text body (instead of an XML element). True both for plain char data and CData.

    Declaration
    public bool IsText()
    Returns
    Type Description
    Boolean

    true or false.

    LastChild()

    Get the last child of the element.

    Declaration
    public XMLElement LastChild()
    Returns
    Type Description
    XMLElement

    New XMLElement.

    Name()

    Name of the element.

    Declaration
    public string Name()
    Returns
    Type Description
    String

    the name as string.

    NextSibling()

    Get the next sibling in the children list of the parent node.

    Declaration
    public XMLElement NextSibling()
    Returns
    Type Description
    XMLElement

    New XMLElement.

    NextSibling(String)

    Get the next sibling with the specified name.

    Declaration
    public XMLElement NextSibling(string name)
    Parameters
    Type Name Description
    String name

    The next sibling name.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    Parent()

    Get the parent node.

    Declaration
    public XMLElement Parent()
    Returns
    Type Description
    XMLElement

    New XMLElement.

    PrependChild(String)

    Prepend a child element with the specified name.

    Declaration
    public XMLElement PrependChild(string name)
    Parameters
    Type Name Description
    String name

    The child name.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    PrependChildValue(String, String)

    Prepend a child node with a given name, which has a (nameless) plain-text child with the given text value.

    Declaration
    public XMLElement PrependChildValue(string name, string value)
    Parameters
    Type Name Description
    String name

    The child name.

    String value

    The child value.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    PrependCopy(XMLElement)

    Prepend a child element with the specified name.

    Declaration
    public XMLElement PrependCopy(XMLElement e)
    Parameters
    Type Name Description
    XMLElement e

    The element to copy.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    PreviousSibling()

    Get the previous sibling in the children list of the parent node.

    Declaration
    public XMLElement PreviousSibling()
    Returns
    Type Description
    XMLElement

    New XMLElement.

    PreviousSibling(String)

    Get the previous sibling with the specified name.

    Declaration
    public XMLElement PreviousSibling(string name)
    Parameters
    Type Name Description
    String name

    The previous sibling name.

    Returns
    Type Description
    XMLElement

    New XMLElement.

    RemoveChild(XMLElement)

    Remove a specified child element.

    Declaration
    public void RemoveChild(XMLElement e)
    Parameters
    Type Name Description
    XMLElement e

    The element to remove.

    RemoveChild(String)

    Remove a child element with the specified name.

    Declaration
    public void RemoveChild(string name)
    Parameters
    Type Name Description
    String name

    The child name.

    SetChildValue(String, String)

    Set the text value of the (nameless) plain-text child of a named child node.

    Declaration
    public bool SetChildValue(string name, string value)
    Parameters
    Type Name Description
    String name

    The child name.

    String value

    The child value.

    Returns
    Type Description
    Boolean

    True if the wait was successful, false otherwise.

    SetName(String)

    Set the element's name.

    Declaration
    public bool SetName(string name)
    Parameters
    Type Name Description
    String name

    The new name.

    Returns
    Type Description
    Boolean

    false if the node is empty.

    SetValue(String)

    Set the element's value.

    Declaration
    public bool SetValue(string value)
    Parameters
    Type Name Description
    String value

    The new value.

    Returns
    Type Description
    Boolean

    false if the node is empty.

    Value()

    Value of the element.

    Declaration
    public string Value()
    Returns
    Type Description
    String

    the value as string.

    In This Article
    • Constructors
      • XMLElement(IntPtr)
    • Methods
      • AppendChild(String)
      • AppendChildValue(String, String)
      • AppendCopy(XMLElement)
      • Child(String)
      • ChildValue()
      • ChildValue(String)
      • Empty()
      • FirstChild()
      • IsText()
      • LastChild()
      • Name()
      • NextSibling()
      • NextSibling(String)
      • Parent()
      • PrependChild(String)
      • PrependChildValue(String, String)
      • PrependCopy(XMLElement)
      • PreviousSibling()
      • PreviousSibling(String)
      • RemoveChild(XMLElement)
      • RemoveChild(String)
      • SetChildValue(String, String)
      • SetName(String)
      • SetValue(String)
      • Value()
    Back to top LSL 4 Unity documentation