![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include "elm/xom.h"
Public Member Functions | |
Document (Document *document) | |
Document (Element *root_element) | |
virtual | ~Document (void) |
virtual Node * | copy (void) |
virtual String | getBaseURI (void) |
virtual Element * | getRootElement (void) |
virtual String | getValue (void) |
virtual void | replaceChild (Node *old_child, Node *new_child) |
virtual void | setBaseURI (String uri) |
virtual void | setRootElement (Element *root) |
virtual String | toString (void) |
virtual String | toXML (void) |
![]() | |
virtual void | appendChild (Node *child) |
virtual int | indexOf (Node *child) |
virtual void | insertChild (Node *child, int position) |
virtual Node * | removeChild (int position) |
virtual Node * | removeChild (Node *child) |
virtual Node * | getChild (int index) |
virtual int | getChildCount (void) |
![]() | |
virtual | ~Node (void) |
void * | getNode (void) const |
kind_t | kind (void) const |
void | detach (void) |
bool | equals (const Node *node) const |
virtual Document * | getDocument (void) |
virtual ParentNode * | getParent (void) |
virtual Nodes * | query (const String &xpath) |
virtual Nodes * | query (const String &xpath, XPathContext *context) |
int | line (void) const |
Protected Member Functions | |
Document (void *node, NodeFactory *fact) | |
![]() | |
ParentNode (void *node) | |
void | internSetBaseURI (String URI) |
![]() | |
Node (void *_node) | |
void | setNode (void *_node) |
Node * | make (void *node) |
Node * | get (void *node) |
Node * | internCopy (void) |
Node * | internGetChild (int index) |
int | internGetChildCount (void) |
String | internGetValue (void) |
String | internToXML (void) |
Additional Inherited Members | |
![]() | |
enum | kind_t { NONE = 0, ELEMENT, DOCUMENT, TEXT, COMMENT, ATTRIBUTE, PROCESSING_INSTRUCTION, DOCTYPE, NAMESPACE } |
typedef enum elm::xom::Node::kind_t | kind_t |
![]() | |
static void | freeNode (void *node) |
![]() | |
void * | node |
The root object of an XML document.
|
protected |
Creates a new Document object with the specified root element.
root | - the root element of this document |
References Node::getNode(), and Document::setRootElement().
References Node::node.
Returns the base URI of this node as specified by XML Base, or the empty string if this is not known. In most cases, this is the URL against which relative URLs in this node should be resolved.
The base URI of a non-parent node is the base URI of the element containing the node. The base URI of a document node is the URI from which the document was parsed, or which was set by calling setBaseURI on on the document.
The base URI of an element is determined as follows:
Otherwise, if any ancestor element of the element loaded from the same entity has an xml:base attribute, then the value of that attribute from the nearest such ancestor is converted from an IRI to a URI, absolutized if possible, and returned. xml:base attributes from other entities are not considered.
Reimplemented from Node.
References Node::node.
Get the root element of the document.
References Node::get(), and Node::node.
Referenced by XOMUnserializer::flush(), Element::parse(), and Serializer::write().
Replaces an existing child with a new child node. If oldChild is not a child of this node, then a NoSuchChildException is thrown.
oldChild | the node removed from the tree |
newChild | the node inserted into the tree |
MultipleParentException | if newChild already has a parent. |
IllegalAddException | if this node cannot have children of the type of newChild. |
Reimplemented from ParentNode.
Implements ParentNode.
References Node::node.
References Node::getNode(), and Node::node.
Referenced by Document::Document(), and XSLTransform::toDocument().
Referenced by XSLTransform::toString().