project BLF > class XML > method ReadXMLAttrib
Description
Submethod of ReadXML. This method reads the attributes of a certain node and puts then into the tNodes temp-table with type 'A'.
Parameters
ihNode | input | handle | |
iiNodeParentId | input | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/xml.p)
vcAttribs = ihNode:ATTRIBUTE-NAMES No-error.
If Error-status:Error
Then Do:
Assign oiReturnStatus = -1.
Return.
End.
REPEAT viCount = 1 TO NUM-ENTRIES(vcAttribs):
Assign vcValue = ihNode:GET-ATTRIBUTE(ENTRY(viCount,vcAttribs)) No-error.
If Error-status:Error
Then Do:
Assign oiReturnStatus = -1.
Return.
End.
CREATE tNodes.
ASSIGN
tNodes.tiNodeId = viCounter
tNodes.tcNodeName = ENTRY(viCount,vcAttribs)
tNodes.tiNodeParentId = iiNodeParentId
tNodes.tcNodeType = 'A':U
tNodes.tcNodeValue = vcValue
viCounter = viCounter + 1.
END.