xsl-list
[Top] [All Lists]

RE: Choosing specific XML node with XSL

2005-02-09 16:49:35
parent/text()

selects the text nodes that are immediate children of the <parent> element.
Remember that there may be more than one of them.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Hiral Parikh [mailto:hparikh(_at_)amesondemand(_dot_)com] 
Sent: 09 February 2005 22:21
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Choosing specific XML node with XSL

Hi,
I am dealing with some dynamically generated XML and ran into some XSL
parsing issues.

The XML is something like this:

<parent>this is parent text
      <child1><child2>this is child text</child2></child1> </parent>

I want the text of <parent> only, but
<xsl:value-of select = "//parent/"/>  returns 'this is parent 
text this is
child text'.

How can I get only the text of <parent> tag and not the 
<child1><child2>
tag.

Thanks in advance,
Hiral 



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>