Hello,
how can i access a node of a xml-file
looks like this:
<RootNode>
<EntryNode>
<ColumnA>Some Value A</ColumnA>
<ColumnB>Some Value B</ColumnB>
</EntryNode>
<EntryNode>
<ColumnA>Some Value C</ColumnA>
<ColumnB>Some Value D</ColumnB>
</EntryNode>
</RootNode>
thanks for your help
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I'm guessing you mean reference it in JavaScript code rather than binding a field to it and using the rawValue?
In JavaScript $data is a reference to the Data DOM, so
$data.resolveNode('RootNode') // refers to your root node
$data.resolveNodes('RootNode.EntryNode[*]').length // returns 2
$data.resolveNodes('RootNode.EntryNode[*].ColumnA').item(1).value // returns "Some Value C"
Bruce
Views
Replies
Total Likes
Hi,
I'm guessing you mean reference it in JavaScript code rather than binding a field to it and using the rawValue?
In JavaScript $data is a reference to the Data DOM, so
$data.resolveNode('RootNode') // refers to your root node
$data.resolveNodes('RootNode.EntryNode[*]').length // returns 2
$data.resolveNodes('RootNode.EntryNode[*].ColumnA').item(1).value // returns "Some Value C"
Bruce
Views
Replies
Total Likes
Thanks so much bruce.
I have another problem.
<RootNode>
<EntryNode>
<ColumnA>Some Value A</ColumnA>
<ColumnB>Some Value B</ColumnB>
</EntryNode>
</RootNode>
$data.resolveNodes('RootNode.EntryNode[*]').length // it returns 1
<RootNode>
</RootNode>
$data.resolveNodes('RootNode.EntryNode[*]').length // it returns 1 why not 0
Arthur
Views
Replies
Total Likes
Do you have some fields bound to EntryNode or ColumnA, etc. If so and they have a min occurs of 1 then an EntryNode will be created in the Data DOM.
thks alot.
Views
Replies
Total Likes
Views
Likes
Replies