Hello,
I am running into a bit of a problem trying to represent data from a datasource (and render it in a grid) when I have an attribute on a node in XML...
Expected: What I want to do is to set a record (via recordXPath) at the 'lowest' level of a nested complex structure, and then specify data values (via valueXPath) up and down the XML tree, if you will.
Problem: The initial record item (lowest level node and attribute, e.g. @name) can be shown in a listGrid, however a complex valueXPath such as "../../element@name" does not return any values
example:
in my datasource, I have the recordXPath set to the lowest nested node, for example:
I am running into a bit of a problem trying to represent data from a datasource (and render it in a grid) when I have an attribute on a node in XML...
Expected: What I want to do is to set a record (via recordXPath) at the 'lowest' level of a nested complex structure, and then specify data values (via valueXPath) up and down the XML tree, if you will.
Problem: The initial record item (lowest level node and attribute, e.g. @name) can be shown in a listGrid, however a complex valueXPath such as "../../element@name" does not return any values
example:
Code:
<streetList>
<street name="Decker" type="asphalt">
<symbolList>
<symbol name="stop" type="standing sign"/>
<symbol name="yield" type="standing sign"/>
</symbolList>
<streetDates sunset="2020" sunrise="1958">
</street>
</streetList>
Code:
isc.DataSource.create({
ID:"streets",
recordXPath: "/streetList/street/symbolList/symbol",
...,
fields: [
{
name:"SymbolName",
valueXPath:"@name"
},
{
name:"StreetName",
valueXPath:"../../street@name"
}
]
...
Comment