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

Using XPath to combine text from multiple nodes?

Subject: Using XPath to combine text from multiple nodes?
From: <mark.allanson@xxxxxxxxxxxxx>
Date: Wed, 31 Aug 2005 16:41:52 +0200
xpath multiple nodes
Hi guys & girls,

Is there any way to write an XPath expression that will combine the text
within two nodes and return a text node that contains the combined strings.
Maybe concat and do what I want, but I have been unable to think of a way to
use the concat function to do what I am after. For an example:

<Employee first="Mark" second="Allanson" />

What I would like to do in this case is to effectively return a node that
contains the text "MarkAllanson".  Although I don't think this would affect
any solutions, the xpath processor is the .Net Framework v1.1.

Another solution I guess would be to be able to write an XPath that could
return node list, and I could then iterate the nodes in code to compile the
string in code; This raises another question of can you use XPath to select
nodes from two distinct areas of code. For example:

<Work>
 <Employee first="Mark" last="Allanson" />
 <Address>
    <City>London</City>
 </Address
</Work>

Is it possible to write an XPath to return a node list that contains both the
first attribute of the employee and the City element of the address?

Any idea's most welcome!

Cheers,

Mark





This message is for the designated recipient only and may contain privileged,
proprietary, or otherwise private information.  If you have received it in
error, please notify the sender immediately and delete the original.  Any
other use of the email by you is prohibited.

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.