getname
Purpose
Synopsis
function getname(doc:xmldoc, n:integer):string
Arguments
|
doc
|
Document to use
|
|
n
|
Node number
|
Return value
The name of the node depending on the node type:
|
XML_ELT
|
|
|
XML_TXT
|
|
|
XML_CDATA
|
|
|
XML_COM
|
|
|
XML_DATA
|
|
|
XML_PINST
|
|
|
XML_ATTR
|
Example
The following example collects the names of all element nodes occurring in a document.
declarations
DB: xmldoc
NodeList: list of integer
NodeNames: set of string
end-declarations
getnodes(DB, "/descendant-or-self::node()", NodeList)
NodeNames:= union(r in NodeList | gettype(DB,r)=XML_ELT) {getname(DB,r)}
writeln("Names of element nodes: ", NodeNames)
Further information
Only element, attribute and processing instruction nodes have a name, for all other node types the above listed constant name is returned.
Related topics
Module
© 2001-2023 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation ("FICO"). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
