hi there!

i need to access the attribute value of an element using the xalan api. my
element is like so:

 <temp att="tempAtt" id="1001"/>

how do i access the value of "att", given that i already have this code:

Collection col =
DatabaseManager.getCollection(PageConstants.COLLECTION_PATH);
XPathQueryService service =
(XPathQueryService)col.getService("XPathQueryService", "1.0");

ResourceSet resultSet = service.queryResource("proj1", xpath);

XObject xo = new XObject();
XMLResource resource = (XMLResource) resultSet.getResource(0);
Node originalnode = resource.getContentAsDOM();

 // Use Xalan xpath parser to extract data
xo = XPathAPI.eval(originalnode, "/" + xpath);

 // TODO
 /* i need to access the attribute values here */

TIA,
-nani

Reply via email to