XML questions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

XML questions

mwieder
All-

I started playing around with the revXML functions today instead of
just rolling my own as usual, and a few questions came up:

1. There seem to be many functions for reading and parsing XML files
into the proper format and they seem to work fine after enough
fiddling with them, but very few functions for writing data. There
still needs to be a fair amount of packaging data for the addElement
and addAttribute functions. There doesn't seem to be any support for
CDATA tags unless I'm missing something. Is there something I missed?
Do I still need to encapsulate this in my own CDATA tags?

2. What in the world is revXMLAddDTD for? I know what a DTD is and I
can validate my xml tree against a DTD, but why would I want to add a
DTD to an existing XML tree?

3. I take it there's no support for xml schemas here, just DTDs.

--
-Mark Wieder
 [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: XML questions

Jan Schenkel
--- Mark Wieder <[hidden email]> wrote:

> All-
>
> I started playing around with the revXML functions
> today instead of
> just rolling my own as usual, and a few questions
> came up:
>
> 1. There seem to be many functions for reading and
> parsing XML files
> into the proper format and they seem to work fine
> after enough
> fiddling with them, but very few functions for
> writing data. There
> still needs to be a fair amount of packaging data
> for the addElement
> and addAttribute functions. There doesn't seem to be
> any support for
> CDATA tags unless I'm missing something. Is there
> something I missed?
> Do I still need to encapsulate this in my own CDATA
> tags?
>
> 2. What in the world is revXMLAddDTD for? I know
> what a DTD is and I
> can validate my xml tree against a DTD, but why
> would I want to add a
> DTD to an existing XML tree?
>
> 3. I take it there's no support for xml schemas
> here, just DTDs.
>
> --
> -Mark Wieder
>

Hi Mark,

Your remarks are quite accurate. I use the library
mostly for reading data, and write the XML by hand.

1. My favourite command for writing to a tree is
revAppendXML, as this allows me to toss in a chunk of
XML data, and have it parsed into the tree instantly.

2. I'm not entirely sure about revXMLAddDTD either. I
presumed it would mean spitting out the tree into text
would insert a reference to a DTD, but it didn't.
Maybe further testing will show that this is meant for
embedding a DTD into your tree.

3. There's no support for XSD, XSL and all those other
goodies. But I know they're on the RR radar, and the
more people request them, the higher the chance to get
them sooner.

Jan Schenkel.

Quartam - Tools for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


               
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs 
 
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: XML questions

mwieder
Jan-

Thursday, July 21, 2005, 11:50:22 PM, you wrote:

JS> 1. My favourite command for writing to a tree is
JS> revAppendXML, as this allows me to toss in a chunk of
JS> XML data, and have it parsed into the tree instantly.

Thanks for the confirmation. RevAppendXML also seems to be the only
builtin command that can handle the CDATA elements. The other append
commands insist on converting the "<" and ">" tags into "&lt;" and
"&gt;" and there doesn't seem to be any way of escaping the literal
chars. What I find annoying about revAppendXML, though, is the
inability to append literal data into an existing node. Node creation
and appending of data must be done in a single step.

--
-Mark Wieder
 [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
 Mark Wieder
 ahsoftware@gmail.com