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

Need Xpath Question (help).

Subject: Need Xpath Question (help).
From: "Ragan, Mitch" <mitch.ragan@xxxxxxxxxx>
Date: Mon, 28 Jan 2002 13:10:19 -0800
xpath mfc
Any one know the answer to either of these questions?


> Using this XPath Builder:
> <http://staff.develop.com/aarons/bits/xpath-builder/>
> (Dosent seem to work well in Netscape Browser) or XML file "Invoices"
> listed below.
> 
> 
> I am looking for the XPath that will : 
> 
>      1) Return the "LineItem" with the lowest Price "in each LineItems"
> (hint:  the parent axis is easier to get working in this case than the
> sibling axes) 
> 
> 		something like? /Invoices/Invoice/LineItems/LineItem/Price
> [Price !> parent::Price]  (only this one is incorrect)
> 
>      2) Select all the text nodes, comment nodes, processing instruction
> nodes, and element nodes that come before the 49.95 Price node,
>         except the ancestors of that Price node.
> 
> 
<?xml version="1.0" encoding="UTF-8"?> 
<Invoices> 
<Invoice ID='1000'> 
 <CustomerName>Jane Smith</CustomerName> 
<LineItems> 
 <LineItem> 
 <Sku>134</Sku> 
 <Description>Dons Boxers</Description> 
  <Price>9.95</Price>
</LineItem> 
<LineItem> 
 <Sku>153</Sku> 
 <Description>Rice Krispy COM Object</Description> 
<Price>10000.00</Price>
</LineItem> 
 <LineItem> 
<Sku>72</Sku> 
<Description>Red Vines</Description> 
<Price>4.95</Price></LineItem></LineItems></Invoice> 
<Invoice ID='1010'> 
<CustomerName>Storm Phillips</CustomerName> 
<LineItems> 
<LineItem> 
<Sku>171</Sku> 
<Description>COM is LOVE T-shirt</Description> 
<Price>9.95</Price></LineItem> 
<LineItem> 
<Sku>200</Sku> 
<Description>ATL Internals</Description> 
<Price>49.95</Price></LineItem></LineItems></Invoice> 
<Invoice ID='1020'> 
<CustomerName>John Stockton</CustomerName> 
<LineItems> 
<LineItem> 
<Sku>53</Sku> 
<Description>Caffeinated Beverages</Description> 
<Price>0.50</Price></LineItem> 
<LineItem> 
<Sku>22</Sku> 
<Description>Friday Pizza</Description> 
<Price>0.00</Price></LineItem> 
<LineItem> 
<Sku>201</Sku> 
<Description>MFC Internals</Description> 
<Price>39.95</Price></LineItem></LineItems></Invoice></Invoices>






  Mitch K. Ragan 
    Boeing Commercial Aircraft Group 
    Global Electronic Commerce 
    Senior Systems Analyst  425-266-3155


 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.