[Home] [By Thread] [By Date] [Recent Entries]

Subject: questions regarding using the following xpath
From: "=?big5?b?qkwgpGyq5A==?=" <minikittygo@xxxxxxxxxxx>
Date: Fri, 22 Mar 2002 16:50:24 +0000
Hi Suppose u have such xml structure....

<root>
<LEVEL>
<level1>
<a>hello</a>
<b>world</b>
<c>abc</c>
</level1>
</LEVEL>
<LEVEL>
<level1>
<a>hello</a>
<b>world</b>
<c>def</c>
</level1>
</LEVEL>
<level1>
<a>hi</a>
<b>you</b>
<c>efg</c>
</level1>
</LEVEL>
...
</root>
notice that the content within the first two < level 1> tag is identical except for the content of c tag. i was wondering whether i can copy the xml data using such expression (or similiar expression) (in particular the xpath expression) to give the following result?: -


<xsl:copy-of select="child::LEVEL/child::*[.//level1="helloworld"]/>

result:

<level1>
 <a>hello</a>
 <b>world</b>
 <c>abc</c>
</level1>
<level1>
 <a>hello</a>
 <b>world</b>
 <c>def</c>
</level1>

mank thanks
regards
Kit





_________________________________________________________________
MSN ¬Ûï´£¨Ñ±z³Ì²³æªº¤è¦¡¤À¨É¨Ã¦C¦L±zªº¬Û¤ù¡A½Ð²¾¦Ü
http://photos.msn.com/support/worldwide.aspx¡C


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



Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member