[REBOL] Re: Rebol & XML
From: sqlab:gmx at: 6-Aug-2003 14:02
Hello Andrew
I would propose something like
>Get-XML x/document/p
is the same as ">Get-XML x/document/p/1"
Then we can do
>Get-XML x/document/p/2
..
..
>Get-XML x/document/p/:n
with a function similar to
Get-XML: func ['x [path ..] [...]
Or just an XML: context [
load: func [...
set: func [..
get: func [
]
AR
> > Load-XML: function [
>
> 'Load-XML can't handle multiple content and elements. For example:
>
> XML: {<?xml version1.0"?>
> <document>
> <h>Heading</h>
> <p class="Initial">Hi this is a <b>bold</b> paragraph.</p>
> <p>this is a <span>stuff</span> paragraph</p>
> </document>
> }
>
> probe X: load-XML XML
>
> [xml [#version "1.0"] document [h "Heading" p [#class "Initial" "Hi this
> is
> a" b "b
> old" "paragraph."] p ["this is a" span "stuff" "paragraph"]]]
> >> x/document/h
> == "Heading"
> >> x/document/p
> == [#class "Initial" "Hi this is a" b "bold" "paragraph."]
>
> Access to second 'p is a bit tricky...
>
> Andrew J Martin
> ICQ: 26227169
> http://www.rebol.it/Valley/
> http://valley.orcon.net.nz/
> http://Valley.150m.com/
> -><-
>
> --
> To unsubscribe from this list, just send an email to
> [rebol-request--rebol--com] with unsubscribe as the subject.
>
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post