Re: XML::LibXML and comments

2018-09-10 Thread Lawrence Statton
> On Sep 10, 2018, at 6:33 AM, John Cortland Morgan > wrote: > > Hi, > > I'm trying to place a comment directly after the XML declaration using > XML::LibXML, > But cannot seem to manage, always receiving error: > > setDocumentElement: ELEMENT node required at .../LibXML.pm line 1393 > >

Re: XML::LibXML and comments

2018-09-10 Thread Andy Bach
Take a look at: https://stackoverflow.com/questions/19411152/libxml-inserting-a-comment use XML::LibXML; my $doc = XML::LibXML::Document->new;my $root = $doc->createElement("doc"); $doc->setDocumentElement($root); $root->appendChild($doc->createElement("JJ")); $root->appendChild($doc->createCommen

Re: slipping through my sieve

2018-09-10 Thread Uri Guttman
On 09/10/2018 12:59 PM, Rick T wrote: I love this mailing list! Once again, Uri, thank for your fruitful suggestions. It took me an afternoon of googling to understand them, but I see now that your suggestions are indeed “cleaner code” and I will implement them from now on. Mostly I want to

Re: slipping through my sieve

2018-09-10 Thread Rick T
I love this mailing list! Once again, Uri, thank for your fruitful suggestions. It took me an afternoon of googling to understand them, but I see now that your suggestions are indeed “cleaner code” and I will implement them from now on. Mostly I want to thank you for nailing me on using global

XML::LibXML and comments

2018-09-10 Thread John Cortland Morgan
Hi, I'm trying to place a comment directly after the XML declaration using XML::LibXML, But cannot seem to manage, always receiving error: setDocumentElement: ELEMENT node required at .../LibXML.pm line 1393 What I would like: testing My relevant code thus far: My $dom = XML::LibXML