wxXmlNode

wxXmlNode

Creation Parameters

parent can be NULL

Functions/Procedures
Supertopics
Subtopics

wxXmlNode

[proc]
add_xml_node_child
( atom node, atom child )

Category: wxXmlNode

Adds the given node as child of this node. To attach a second children to this node, use the set_next_xml_node function of the child node.


wxXmlNode

[proc]
add_xml_node_property
( atom node, sequence name, sequence val )

Category: wxXmlNode

Appends a property with given name and value to the list of properties for this node.


wxXmlNode

[proc]
delete_wxXmlNode
( object obj )

Category: wxXmlNode

Deletes a wxXmlNode object (use this instead of delete_instance or destroy)


wxXmlNode

[func]
delete_xml_node_property
( atom node, sequence name )

Category: wxXmlNode

Removes the first properties which has the given name from the list of properties for this node.


wxXmlNode

[func]
get_next_xml_node
( atom node )

Category: wxXmlNode

Returns a pointer to the sibling of this node or NULL if there are no siblings.


wxXmlNode

[func]
get_parent_xml_node
( atom node )

Category: wxXmlNode

Returns a pointer to the parent of this node or NULL if this node has no parent.


wxXmlNode

[func]
get_xml_content
( atom node )

Category: wxXmlNode

Returns the content of this node. Can be an empty string. Be aware that for nodes of type wxXML_ELEMENT_NODE (the most used node type) the content is an empty string. See get_xml_node_content for more details.


wxXmlNode

[func]
get_xml_node_children
( atom node )

Category: wxXmlNode

Returns the first child of this node. To get a pointer to the second child of this node (if it does exist), use the get_next_xml_node function on the returned value.


wxXmlNode

[func]
get_xml_node_content
( atom node )

Category: wxXmlNode

Returns the content of the first child node of type wxXML_TEXT_NODE or wxXML_CDATA_SECTION_NODE. This function is very useful since the XML snippet "<tagname>tagcontent</tagname>" is represented by expat with the following tag tree:

wxXML_ENTITY_NODE name="tagname", content=""
|-- wxXML_TEXT_NODE name="", content="tagcontent"
or eventually:
wxXML_ENTITY_NODE name="tagname", content=""
|-- wxXML_CDATA_SECTION_NODE name="", content="tagcontent"
An empty string is returned if the node has no children of type wxXML_TEXT_NODE or wxXML_CDATA_SECTION_NODE, or if the content of the first child of such types is empty.

wxXmlNode

[func]
get_xml_node_depth
( atom node, atom grandparent )

Category: wxXmlNode

Returns the number of nodes which separe this node from grandparent.

This function searches only the parents of this node until it finds grandparent or the NULL node (which is the parent of non-linked nodes or the parent of a wxXmlDocument's root node).


wxXmlNode

[func]
get_xml_node_name
( atom node )

Category: wxXmlNode

Returns the name of this node. Can be an empty string (e.g. for nodes of type wxXML_TEXT_NODE or wxXML_CDATA_SECTION_NODE).


wxXmlNode

[func]
get_xml_node_properties
( atom node )

Category: wxXmlNode

Return a pointer to the first property of this node.


wxXmlNode

[func]
get_xml_node_prop_val
( atom node, sequence prop_name, sequence default )

Category: wxXmlNode

Returns the value of the property named prop_name if it does exist. If it does not exist, the default is returned.


wxXmlNode

[func]
get_xml_node_type
( atom node )

Category: wxXmlNode

Returns the type of this node.


wxXmlNode

[func]
insert_xml_child
( atom node, atom child, atom before_node )

Category: wxXmlNode

Inserts the child node immediately before before_node in the children list. If before_node is NULL, then child is prepended to the list of children and becomes the first child of this node. Returns true if before_node has been found and the child node has been inserted.


wxXmlNode

[func]
is_xml_whitespace_only
( atom node )

Category: wxXmlNode

Returns true if the content of this node is a string containing only whitespaces (spaces, tabs, new lines, etc). Note that this function is locale-independent since the parsing of XML documents must always produce the exact same tree regardless of the locale it runs under.


wxXmlNode

[func]
remove_xml_node_child
( atom node, atom child )

Category: wxXmlNode

Removes the given node from the children list. Returns true if the node was found and removed or false if the node could not be found.

Note that the caller is reponsible for deleting the removed node in order to avoid memory leaks.


wxXmlNode

[proc]
set_next_xml_node
( atom node, atom next )

Category: wxXmlNode

Sets as sibling the given node. The caller is responsible to delete any previously present sibling node.


wxXmlNode

[proc]
set_parent_xml_mode
( atom node, atom parent )

Category: wxXmlNode

Sets as parent the given node. The caller is responsible to delete any previously present parent node.


wxXmlNode

[proc]
set_xml_node_children
( atom node, atom child )

Category: wxXmlNode

Sets as first child the given node. The caller is responsible to delete any previously present children node.


wxXmlNode

[proc]
set_xml_node_content
( atom node, sequence con )

Category: wxXmlNode

Sets the content of this node.


wxXmlNode

[proc]
set_xml_node_name
( atom node, sequence name )

Category: wxXmlNode

Sets the name of this node.


wxXmlNode

[proc]
set_xml_node_properties
( atom node, atom prop )

Category: wxXmlNode

Sets as first property the given wxXmlProperty object. The caller is responsible to delete any previously present properties attached to this node.


wxXmlNode

[proc]
set_xml_node_type
( atom node, atom xml_type )

Category: wxXmlNode

Sets the type of this node.


wxXmlNode

[func]
xml_node_has_prop
( atom node, sequence prop_name )

Category: wxXmlNode

Returns true if this node has a property named prop_name.