getfirstattr


Purpose
Get the first attribute of an element node.
Synopsis
function getfirstattr(doc:xmldoc, n:integer):integer
Arguments
doc 
Document to use
Node number (must be an element)
Return value
The node number of the first attribute of the element node provided or -1 if there is no attribute.
Example
The following example displays all attributes of node e:
  declarations
    DB: xmldoc
    a,e: integer
  end-declarations
  
  a:=getfirstattr(DB,e)
  while(a>0) do
    writeln(getname(DB,a), "=", getvalue(DB,a))
    a:=getnext(DB,a)
  end-do
Further information
Attributes are represented by nodes of type XML_ATTR: all node-related routines can be applied to attribute nodes.
Related topics
getnext, getfirstchild, getlastchild, getparent
Module
mmxml


If you have any comments or suggestions about these pages, please send mail to support@fico.com.

© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.