homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

XPath Anyone ?

Msg#: 4596125 posted 4:56 pm on Jul 24, 2013 (gmt 0)

Hi folks, hope someone can help me.

I have an XML file which i am trying to filter by Brand using XPath, there may be other ways of doing it but the particular application i am using requires XPath.

So if i set the XPath as /Table i get 6000 elements, each one looking something like this :

<ShortDescription>Bassaya Agnez BlackL/XL</ShortDescription>
<Range>Bassaya Agnez</Range>
<SupplyType>Stock Lines</SupplyType>

Great, but i want to filter out all the Brands except one, i'll say Bassaya for arguments sake as it is in the preview.

So my understanding was that something like this should work

/Table[Brand=Bassaya] .. but it fails.

sorting by price greater than works like this

/Table[RRP>49.99] ... so i guess i'm kinda on the right track, anybody know any better ?

Thanks for your help folks.



WebmasterWorld Senior Member 5+ Year Member

Msg#: 4596125 posted 9:53 pm on Jul 28, 2013 (gmt 0)

You need to put quotes around Bassaya e.g.


Msg#: 4596125 posted 1:17 pm on Aug 1, 2013 (gmt 0)

Sorry for the late reply, got the job sorted perfectly. Thank you very much for your help !

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved