Just to add to Joel's comprehensive description.

You can also you the parse function to deal with the structure returned by
the parse-xml function.

Here an example which Martin Johannesson described some time back.

Just copy and paste this into a Rebol console session.

    xml-structure: ['document none! xml-element-contents]
    xml-element-node: [into [xml-element-name xml-element-attributes
xml-element-contents]]
    xml-element-name: [set elt-name string! (print elt-name)]
    xml-element-attributes: [none! | block!]
    xml-element-contents: [none! | into [some [xml-element-node |
string! ]]]

    xml-target: http://p.moreover.com/cgi-local/page?index_devoper+xml
    parse parse-xml read xml-target xml-structure

I put in a bit of code into xml-element-name in order to print the element
names as they occur.
You could go on to adjust the parse rule for a specific dtd. Which is what I
did for moreover.com.

It would be nice if some wrote a DTD to parse-rule translator :)

Brett.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to