[REBOL] parse-xml cannot be reversed Re:(2)
From: bhandley:zip:au at: 31-Jul-2000 10:54
> With a few adjustments, it should be able to handle all xml-parsed
> trees, afaik... but it's 5:48am right now, so I may be wrong. :-)
>
I think I stand corrected. Which is good :)
> You can also parse the whole parse-xml structure with the new block
> parser in /View and /Core 2.3. It only takes about 6 lines of
> code. :-)
>
> Try this:
>
> doc-rule: ['document none! subtags-rule]
> subtags-rule: [none! | into [some [tag-rule | substring-rule]]]
> tag-rule: [into [string! parameters-rule subtags-rule]]
> substring-rule: [string!]
> parameters-rule: [none! | block!]
> parse (parse-xml {<a>teststring<b/><c/></a>}) doc-rule
>
This is great. I was wanting to see an example of block parse with into in
action.
Brett.