DOM's methods
Table of method of the Scriptpol DOM API.
int addChild(xelement) | Adds a sub-element. |
int addNext(xelement) | Adds an element after the last element. |
void assign(dom) | Assign another dom tree. |
dom at() | Points out current path according to the iterator. |
dom at(text) | Points out the tag given as argument (from current path). |
dom at(text, text) | Selects the element by attribute and value. |
dom begin() | Points out the first element at level. |
void build() | Create the dom tree of the document. |
void clear() | Erase the whole dom tree. |
dom dec() | Points out the previous element at level. found() returns false when the beginning it reached. |
void display(int) | Display the document in xml on the screen. The dom.LIGHT mode may be choosen . |
dom([text]) | Constructor with a document name as option. |
int down() | Points out the first child element. |
void dump() | Displays the internal dom structure on screen. |
boolean empty() | Returns true if the tree is empty. |
dom end() | Points out the last element at level. |
boolean found() | Returns true while the iterator founds another element. |
xnode getChild() | Returns the child node (of current node). |
xcomment getComment() | Returns a comment if the node is a comment. |
xelement getElement() | Returns an element if the node is an element. |
xnode getNext() | Returns the next node. |
xscript getScript() | Returns the script if the node is a script. |
boolean isComment() | Returns true if the node is a comment. |
boolean isElement() | Returns true if the node is an element. |
boolean isScript() | Returns true if the node is an instruction. |
dom inc() | Points out the next node at level. found() returns false when the end is reached. |
boolean load(text) | Load a xml document into the dom tree, using expat as importer. |
boolean load(fonction, text) | Load a xml document into the dom tree (uses libxml or expat). |
dom next() | Points out the next node at level |
void push(xnode) | Adds a node at end of the first level. |
void pushChild(xnode) | Adds a node and childs as child of currently pointed out node. |
void pushNext(xnode) | Adds a node and childs as successor of currently pointed out node. |
void remove() | Suppresses the pointed out node. |
dom reset() | Points out the root of the tree. |
void save(text, int) | Saves the document, with the given name. Same option that display() |
void setChild(xnode) | Adds a child node to pointed out one. |
void setNext(xnode) | Adds a successor to pointed out node. |
void up() | Jumps to successor of parent of the current node. |
Table of xelement methods
int addAttribute(text, text) | Adds an attribute (name and value) |
xelement begin() | Points out the first attribute of the element. |
boolean found() | Returns false when attemps to iterate is a chess |
text getName() | Return the name of the element. |
text getValue(string) | Returns the value of the attribute for the name. |
xelement inc() | Points out the next attribute. found() returns false when the top is reached. |
text nextName() | Returns the name of pointed out attribute. |
text nextValue() | Returne the value of pointed out attribute. |
void setName(text) | Set the name. |