Thanks, Bruno.
I've been using XML::Writer to generate the XML and that works well.
Problem is I need to
display the generated XML code in a browser. To display the code
you generally need to
escape the special characters, like the '> < &' (>, < &) which
is where I have the problem.
XML::Writer creates well formed XML, which is great, but I need to
create XML for displaying
in a browser.
So, instead of generating this:
<project name="foobar" default="xyz" basedir="." />
I need this:
<project name="foobar" default="xyz" basedir="." />
I've looked at most of the modules you've listed but I haven't yet
found one that generates
escaped XML.
Guess I'll keep looking or write the XML myself.
Thanks again.
Carter.
On May 9, 2006, at 11:20 PM, Bruno Georges wrote:
Hi Carter
I suggest you have a look at the following XML modules:
In your scipt, these module should suffice.
use XML::Parser;
use XML::Simple;
# mod to convert from/to other output
use XML::Dumper;
use CGI::XML;
they should cover the basic XML parsing and generation requierment you
have.
There are other XML modules out of XML:: which are designed to writing
generic XML
XML::Generator
XML::Grove
XML::Writer
I haven't used them much recently but the modules documentation is
great
and provides plenty of examples.
to get the doc for these modules, you can use for example:
on unix
man XML::Dumper
or on any OS
perldoc
hope this helps.
With Best Regards
Bruno Georges
Glencore International AG
Tel. +41 41 709 3204
Fax +41 41 709 3000
|---------+------------------------------------------------->
| | Carter Thompson |
| | <[EMAIL PROTECTED]> |
| | Sent by: |
| | [EMAIL PROTECTED]|
| | veState.com |
| | |
| | |
| | 09.05.06 21:28 |
| | |
|---------+------------------------------------------------->
---------------------------------------------------------------------
-------------------------------------------------|
|
|
| To: Perl Users <perl-win32-
[EMAIL PROTECTED]>
|
|
cc:
|
| Subject: XML Output to
Web
|
|
|
|
Distribute:
|
|Personal?
|-------|
|
| | [ ] x
|
|
|
|-------|
|
|
|
---------------------------------------------------------------------
-------------------------------------------------|
Hi,
I need a little help finding a module that will write XML to a
webpage. More specifically,
I have a CGI script that gathers information based on user input and
when all information
is collected I'd like to spit out XML for the user to cut and paste
into their favorite text editor.
Now, I could write all the special characters (>, <, &, etc)
out to the page but that's
a hassle and I'm fairly certain someone's already done this before.
Any suggestions on what module to use to print XML to my page?
Thanks,
Carter.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
LEGAL DISCLAIMER. The contents of this e-mail and any attachments
are strictly
confidential and they may not be used or disclosed by someone who
is not a
named recipient.
If you have received this email in error please notify the sender
by replying
to this email inserting the word "misdirected" as the message and
delete this
e-mail from your system.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs