Re: Predicates in HaXml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Predicates in HaXml

luby liao
For this purpose, try
  h1 [keep /> dfilter (parseXtract "/greetings/greeting[1]/-")]
cheers, Luby Liao

 > I am just trying out a few things with the Xtract tool. I have a
 > simple XML document:
 >
 > <greetings>
 > <greeting>hello</greeting>
 > <greeting>world</greeting>
 > </greetings>
 >
 > I am using the Xtract query /greetings/greeting[1]/- hoping to get the
 > text "world"
 > e.g.
 > mkElem "h1" [applypred (keep) (parseXtract "/greetings/greeting[1]/-")]
 >
 > but this just returns the entire xml document. Have i got something
 > fundamentally wrong here?
 >
 > Thanks
 > Tom Spencer
 >
 >

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe