You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Jeff Williams <jw...@darkphoton.com> on 2000/04/07 05:45:19 UTC

Getting value of data found at TagName/TagName/TagName

Hello,

    I have a Document that has been parsed.  (Example found below) I want to
get the value found at a specific TAG location (don't know any other way of
putting it).
    For example (Using XML below) I want to get the value of
Service/ServiceIdentitifer/Identifier which would return "DSL Highspeed
Internet".  This is the same way XSL match document parts.

    Once I have the Document what methods can I use to do this within
Xerces?  Or do I have to walk the tree?  Or more likly I am just missing
something in the API docs.

Thanks, Jeff


<?xml version="1.0"?>
<!DOCTYPE Service SYSTEM
"http://www.cnerds.org/eOSS/Catalog/product%20catalog.dtd">
<Service>
<ServiceIdentifier><Identifier>DSL Highspeed
Internet</Identifier></ServiceIdentifier>
<Description>Provides highspeed internet over the 3DSL
service.</Description>
<Status>Available</Status>
<Availability>April 1, 2000</Availability>
<Version>1.0</Version>
<BillingID></BillingID>
<ProductList>
<ProductIdentifier><Identifier>ADSL Modem</Identifier></ProductIdentifier>
<ProductIdentifier><Identifier>ADSL Line</Identifier></ProductIdentifier>
<ProductIdentifier><Identifier>Internet
Access</Identifier></ProductIdentifier>
<ProductIdentifier><Identifier>Internet
E-Mail</Identifier></ProductIdentifier>
</ProductList>
<AttributeList>
<AttributeValue
AttributeName="TrialService"><AttributeIdentifier><Identifier>Trial</Identif
ier></AttributeIdentifier>
<Field
FieldName="Value"><FieldValue>Yes</FieldValue></Field></AttributeValue>
</AttributeList>
</Service>