Class (GI Struct)

Rest-1.0RestXmlNode

The Rest.XmlNode contains a parsed XmlNode for easy consumption

Index

Constructors

Properties

content: string
name: string
$gtype: GType<XmlNode>

Methods

  • Adds attribute to the given node.

    Parameters

    • attribute: string

      name of the attribute

    • value: string

      value to set attribute to

    Returns void

  • Adds a new node to the given parent node; to create the top-level node, parent should be null.

    Parameters

    • tag: string

      name of the child node

    Returns XmlNode

    the newly added Rest.XmlNode; the node object is owned by, and valid for the life time of, the RestXmlCreator.

  • Searches for the first child node of start named tag.

    Parameters

    • tag: string

      the name of a node

    Returns XmlNode

    the first child node, or null if it doesn't exist.

  • Get the value of the attribute named attr_name, or null if it doesn't exist.

    Parameters

    • attr_name: string

      the name of an attribute

    Returns string

    the attribute value. This string is owned by Rest.XmlNode and should not be freed.

  • Recursively outputs given node and it's children.

    Returns string

    xml string representing the node.

  • Sets content for the given node.

    Parameters

    • value: string

      the content

    Returns void