[racket] xml processing question
(require xml) does not provide any special processing functions. You
can use normal pattern matching and functions on both the XML data
structures and the xexpr representation. I used 'match' a lot.
If you look on PLaneT, you will find a few processing libraries, like
an XPath implementation.
Jay
2010/12/22 Manfred Lotz <manfred.lotz at arcor.de>:
> Hi there,
> I'd like to know how to idiomatically handle xml using racket's xml.
>
> Let's assume a minimal example like this:
>
>
> (define xmlin "
> <doc>
> <name>Some software</name>
> <more licence='gpl' checked='2010-12-10'/>
> <ref id='someref'/>
> <author id='John Doe'/>
> </doc>")
>
>
> (define xe (string->xexpr xmlin))
> or
> (define xe (xml->xexpr (document-element (read-xml (open-input-string
> xmlin)))))
string->xexpr IS that
>
> Now my question is, how would I retrieve the contents of the xml
> string?
>
> Do I have to work thru the xexpr by myself or are there some
> predefined procedures available which I perhaps didn't recognize when
> looking at the documentation?
>
>
>
>
>
>
> --
> Manfred
>
>
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users
>
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay
"The glory of God is Intelligence" - D&C 93