Differences between revisions 3 and 4
Revision 3 as of 2004-02-12 20:50:34
Size: 658
Editor: adsl-155-128-44
Revision 4 as of 2009-09-20 23:23:41
Size: 658
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Q) I followed the Documentation for selecting an attribute but I get no data or a Java XPath Error? I am using Windows 2000.

A) To use an XPath with an attribute on Windows 2000 you will need to enclose the entire XPath expression in double quotes " . For Example:

C:\apache>xindice xpath -c xmldb:xindice://localhost:8080/db/test -q /TEST_NODE/DATA[@_myAttr="3"]

will not return any data or cause a Java error.

Instead, use:

C:\apache>xindice xpath -c xmldb:xindice://localhost:8080/db/test -q "/TEST_NODE/DATA[@_myAttr='3']"

(note the single quotes around the attrbiute value)

This will return the desired node.

XindiceFAQ/AttributeValue (last edited 2009-09-20 23:23:41 by localhost)