Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ÜberRookie on Apr 28, 2009 06:48
open dhtmlx forum
DhtmlxAjax loader structure

Where can I find the structure of the loader result?
Documentation provides only:

var result = loader.doXPath("/some/expression[@arg='value']");
    for(var i=0;i<result.length;i++){
        alert(result[i].nodeName)
    }

nodeName is in the example, but where do I find the other results?
F.e. The values of "/some/expression/*"
Answer posted by Support on Apr 28, 2009 13:56
The result of doXPath method is a collection of XML nodes ( an array ) , so you can iterate through it same as in case of normal array.
Each element of array - XML node, which can be polled to get attributes or values of sub-child nodes.
Answer posted by ÜberRookie on Apr 28, 2009 21:49

So the structure of the array is like this? Nothing more or less?

Property Description IE F O W3C
baseURI Returns the absolute base URI of a node No 1 No Yes
childNodes Returns a NodeList of child nodes for a node 5 1 9 Yes
firstChild Returns the first child of a node 5 1 9 Yes
lastChild Returns the last child of a node 5 1 9 Yes
localName Returns the local part of the name of a node No 1 9 Yes
namespaceURI Returns the namespace URI of a node No 1 9 Yes
nextSibling Returns the node immediately following a node 5 1 9 Yes
nodeName Returns the name of a node, depending on its type 5 1 9 Yes
nodeType Returns the type of a node 5 1 9 Yes
nodeValue Sets or returns the value of a node, depending on its type 5 1 9 Yes
ownerDocument Returns the root element (document object) for a node 5 1 9 Yes
parentNode Returns the parent node of a node 5 1 9 Yes
prefix Sets or returns the namespace prefix of a node No 1 9 Yes
previousSibling Returns the node immediately before a node 5 1 9 Yes
textContent Sets or returns the textual content of a node and its descendants No 1 No Yes
text Returns the text of a node and its descendants. IE-only property 5 No No No
xml Returns the XML of a node and its descendants. IE-only property 5 No No No

Answer posted by Alex (support) on Apr 29, 2009 09:39
Also you can use getAttribute(attribute_name) method to get the attribute value.