Returns the number of attributes that are defined for the passed node. You can afterwards access the attribute values with XmlGetAttributeByIndex.
XmlAPI.bdh
XmlGetAttributeCount( in hNode : number ): number;
number of attributes
Parameter | Description |
---|---|
hNode | Handle to an XML node |
dcltrans transaction TMain var hDocument, hResult, nAttrCount : number; begin hDocument := XmlCreateDocumentFromXml( "<root><child1 attr1='avalue1'>childvalue1</child1>" "<child2 attr1= 'avalue2'>childvalue2</child2></root>"); hResult := XmlSelectSingleNode(hDocument, "/root/child2"); nAttrCount := XmlGetAttributeCount(hResult ); end TMain;