aulio
06-12-2007, 01:14 AM
I have a following dataset in which the block element has been created dynamically.
<dataset name="editorData">
<textBlocks>
<block ref="123">Text in dataset.</block>
</textBlocks>
</dataset>
I set the data pointer as follows:
pointer.setXPath("editorData:/textBlocks[1]/block[@ref='123']");
Then
pointer.xpathQuery("editorData:/textBlocks[1]/block[@ref='123'")
outputs
<block ref="123">Text in dataset.</block>
But the pointer.isValid() method gives me false. Also, I'm not able to delete the node, set node text, etc. It feels like the pointer points to a kind of nodeset instead of a single node.
Can you tell what is the problem?
<dataset name="editorData">
<textBlocks>
<block ref="123">Text in dataset.</block>
</textBlocks>
</dataset>
I set the data pointer as follows:
pointer.setXPath("editorData:/textBlocks[1]/block[@ref='123']");
Then
pointer.xpathQuery("editorData:/textBlocks[1]/block[@ref='123'")
outputs
<block ref="123">Text in dataset.</block>
But the pointer.isValid() method gives me false. Also, I'm not able to delete the node, set node text, etc. It feels like the pointer points to a kind of nodeset instead of a single node.
Can you tell what is the problem?