xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Dodd <AnthonyD...@synergy-fs.com>
Subject RE: Getting value of data found at TagName/TagName/TagName
Date Fri, 07 Apr 2000 10:24:35 GMT
Hi Jeff
  See the Xalan sample ApplyXPath, this should give you some pointers and
actual code for what you want to do.
Thanks Tony 

-----Original Message-----
From: Jeff Williams [mailto:jwilliams@darkphoton.com]
Sent: 07 April 2000 04:45
To: general@xml.apache.org
Subject: 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>


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

Mime
View raw message