[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

attributes and nodes

Subject: attributes and nodes
From: saigo@xxxxxxxxxxxxx (Evgenia Firsova)
Date: Mon, 21 Apr 2003 15:11:47 +0400
attributes and nodes
Hello,

I have xml:
<AddressCountryList>
	<Country ID="1" DepartID="8" Name="countryname">
		<City Nick="nickname1" Mail="mail" AddressID="1">
			<PhoneList>
				<Phone Num="pnone"/>
			</PhoneList>
		</City>
		<City Nick="nickname2" Mail="mail" AddressID="3">
			<PhoneList>
				<Phone Num="phone"/>
			</PhoneList>
		</City>
	</Country>
	...
</AddressCountryList>

I need an XPATH, which matched Country with _all_ it's attributes and 
_some_ childrens.
Something like //AddressCountryList/Country/@*|City[@Nick='nickname1']

The result I need is:

<AddressCountryList>
	<Country ID="1" DepartID="8" Name="countryname">
		<City Nick="nickname1" Mail="mail" AddressID="1">
			<PhoneList>
				<Phone Num="pnone"/>
			</PhoneList>
		</City>
	</Country>
	...
</AddressCountryList>

This task should be done with only one XPATH because I'll use it not in 
xslt, ubt on other script language.

Please, please help me.

-- 
 Yours sincerely, Evgenia Firsova (saigo@xxxxxxxxxxxxx)
 ---------------------------------------------------
 NEVA Travel Company    http://www.nevatravel.ru/  
 Russia, St.Petersburg, 1st. Sovetskaya str. 8
 fax +7 (812) 327-3267  phone +7 (812) 277-4212


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.