posted 18 years ago
Im trying to use xpath to obtain certain nodes from a document. The following however does not produce the result which Im looking for. I only know one element in this case dataset and one attribute @name so I need to do it this way. The xpath query produces the right result in a xml editor so Im just confused why I cant this to work. Thank you for your time.
NodeList childNodeList = XPathAPI.selectNodeList(document,"dataset//*[@name='AA']");
<?xml version="1.0" encoding="ISO-8859-1" ?>
<dbdata>
<dataset>
<recordset name="AA" primarykey="AID" sql="SELECT * FROM TEAM" recordname="CC">
<whereClause name="BID" type="String"/>
<col type="int">A</col>
<col type="String">B</col>
</recordset>
</dataset>
</dbdata>