Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

perl and DOM

by mycall14 (Initiate)
on Apr 27, 2002 at 04:36 UTC ( #162459=perlquestion: print w/ replies, xml ) Need Help??
mycall14 has asked for the wisdom of the Perl Monks concerning the following question:

Hey All mighty wise monks,
I Have a HTML page which i have parsed and i now wish to add the elements i have extracted from it to a DOM object so i can then use $dom_object->toString to print out my DOM object as an XML page.
I have looked through the XML::DOM module but it just seems to be for parsing XML documents and creating the DOM from that. Is there some way to create the XML DOM object without using the parser. eg
$dom_obj = new XML::DOM (); $dom_obj->addElement(blah blah);
etc etc...
I realise there is HTML::Parser and Treebuilder which could be used to create the DOM but i didnt really want to use these.
So to summarise all this all i really want to be able to do is create the DOM object without havin the use the XML::DOM::Parser.

Any help is greatly appreactied.
Mycall

Comment on perl and DOM
Select or Download Code
Re: perl and DOM
by miyagawa (Chaplain) on Apr 27, 2002 at 06:42 UTC
Re: perl and DOM
by Matts (Deacon) on Apr 27, 2002 at 08:10 UTC
    XML::LibXML includes a HTML parser.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://162459]
Approved by particle
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2014-12-18 20:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (61 votes), past polls