Indica a quantidade de nós posteriores no mesmo nível do nó atual.
DOMSiblingCountPosition() |
Nome | Tipo | Descrição |
|---|---|---|
nRet | numérico | Quantidade de nós posteriores no mesmo nível do nó atual. |
user function TXSCntP()
Local cXML := ""
Local oXML
oXML := TXMLManager():New()
cXML += '<book isNew="true">' + CRLF
cXML += ' <title>A Clash of Kings</title>' + CRLF
cXML += ' <author>George R. R. Martin</author>' + CRLF
cXML += ' <price>9.99</price>' + CRLF
cXML += ' <origin>US</origin>' + CRLF
cXML += '</book>' + CRLF
if !oXML:Parse( cXML )
conout( "Errors on Parse!" )
return
endif
// Vai exibir "book"
conout( oXML:CNAME )
// Vai exibir "0"
conout( oXML:DOMSiblingCountPosition() )
oXML:DOMChildNode()
// Vai exibir "title"
conout( oXML:CNAME )
// Vai exibir "3"
conout( oXML:DOMSiblingCountPosition() )
oXML:DOMNextNode()
// Vai exibir "author"
conout( oXML:CNAME )
// Vai exibir "2"
conout( oXML:DOMSiblingCountPosition() )
return |