[Haskell-cafe] Re: Predicates in HaXml

luby liao lubyliao at gmail.com
Sun Apr 23 12:35:43 EDT 2006


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
 >
 >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/haskell-cafe/attachments/20060423/5255f5c4/attachment.htm


More information about the Haskell-Cafe mailing list