Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: ~parse-xml

From: al:bri:xtra at: 23-Jan-2001 20:52

David Vydra wrote:
> is there a function that reverses parse-xml; builds xml from the block?
Not quite, but there is:
>> unit %/c/Rebol/units/HTML.r
== true
>> print HTML [
[ Title "My title here." [ body [ H1 "A header" [ IP "Initial paragraph" [ P "Subsequent paragraph." [ ] <html> <head> <title>My title here.</title> </head> <body> <h1>A header</h1> <p class="Initial">Initial paragraph</p><p>Subsequent paragraph.</p></body> </html>
Or better is:
>> unit %/c/Rebol/Units/eText.r
== true
>> print HTML eText {My title here
{ { A inital paragraph { { Subsequent paragraph. { } <html> <head> <title>My title here</title> <link rel="stylesheet" href="eText.css" type="text/css"> </head> <body> <h1><a name="My_title_here">My title here</a></h1> <p class="Initial">A inital paragraph </p><p>Subsequent paragraph. </p></body> </html> These scripts are available from my site: I hope that helps! Andrew Martin ICQ: 26227169