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)