Class XMLTAG

Name

XMLTAG  --  Class of XML tag. This class is used in XML parsing.

Synopsis

 XMLTag(<name>)	--> XMLTag object
 
 
 
 
 
 

Description

Class XMLTag

Attributes

<className> - Class name. Value should be "XMLTag".

Methods

ADDCHILD Add child tag.
ATTRIBUTE Get child tag by its number.
COUNTCHILDS Get child tag count.
DUMP Dump current tag and all its children to XML format.
GETATTRIBUTES Get all attributes with their values.
GETCHILD Get child tag by its number.
GETCHILDS Get all child tags.
GETNAME Get tag name.
GETPARENT Get parent tag.
GETTEXT Get text into the tag.
REMOVEATTRIBUTE Remove attribute.
REMOVECHILD Remove child tag.
SETATTRIBUTE Set value to attribute.
SETTEXT Set text into the tag.
XMLTAG Constructor. Create tag object.
XPATH Execute XPath query with the current tag context.

Method XMLTAG:ADDCHILD()

 addChild(<tag>,[<position>])

Method XMLTAG:ATTRIBUTE()

 attribute(<attrName>,<defVal>) --> <cValue>

Method XMLTAG:COUNTCHILDS()

 countChilds()	--> <nCount>

Method XMLTAG:DUMP()

 dump([<encoding>],[<level>])	--> <cXML>

Method XMLTAG:GETATTRIBUTES()

 getAttributes() --> <aAttributes>

Method XMLTAG:GETCHILD()

 getChild(<position>) --> <oTag>

Method XMLTAG:GETCHILDS()

 getChilds() --> <aTags>

Method XMLTAG:GETNAME()

 getName()	--> <cName>

Method XMLTAG:GETPARENT()

 getParent()	--> <oParentTag>

Method XMLTAG:GETTEXT()

 getText()	--> <cText>

Method XMLTAG:REMOVEATTRIBUTE()

 removeAttribute(<attrName>)

Method XMLTAG:REMOVECHILD()

 removeChild(<position>)

Method XMLTAG:SETATTRIBUTE()

 setAttribute(<attrName>,<attrValue>)

Method XMLTAG:SETTEXT()

 setText(<text>)

Method XMLTAG:XMLTAG()

 XMLTag(<name>)	--> XMLTag object

Method XMLTAG:XPATH()

 XPath()	--> <Result>

Example:

 f := XMLTree()
 f:parseFile( "component.xml" )
 tag := f:getRoot()
 tag:setAttribute( "version", "1.1" )
 ?? f:dump()
 

Platforms

No dependies of platform.