in reply to Re: Dynamic XML
in thread Dynamic XML

Upper case tag names _are_ valid XML as long as your DTD defines than as upper case. It looks to me like XML::Generator is probably based on CGI.pm already. You can do stuff like:
use XML::Generator; my $x = XML::Generator->new('escape' => 'always', 'conformance' => 'strict'); print $x->foo($x->bar({baz=>3}, $x->bam()), $x->bar(['qux'],"Hey there,\n", "world"));
which would generate
<foo><bar baz="3"><bam /></bar><qux:bar>Hey there, world</qux:bar></foo>
So the API looks very similar to CGI.pm - even down to the hash reference for attributes.

--
http://www.dave.org.uk

European Perl Conference - Sept 22/24 2000
http://www.yapc.org/Europe/

Replies are listed 'Best First'.
Re^2: Dynamic XML
by hallikpapa (Scribe) on Aug 17, 2007 at 16:47 UTC
    How would you change this up to includes thousands of entries? I just started fiddling around with it, but so far I am only returning the last entry in my query. all of my data is stored in a hash right now, but I thought it would be great to use the XML generator to drop all of that data in the proper format, but could use a little guidance.