Initializing help system before first use

gettype

gettype


Purpose
Get the type of a node.
Synopsis
function gettype(doc:xmldoc, n:integer):integer
Arguments
doc 
Document to use
Node number
Return value
The type of the node:
XML_ELT 
an element
XML_TXT 
a text
XML_CDATA 
a CDATA section
XML_COM 
a comment
XML_DATA 
a data section
XML_PINST 
a processing instruction
XML_ATTR 
an attribute
-1 
if the node number is not valid
Example
See getname.
Further information
This function returns -1 if the provided node number is not valid: this feature can be used to verify the validity of a node number before using it with other functions.
Related topics
Module