http://qs1969.pair.com?node_id=11135444


in reply to Re: XML round-trip with comments and prolog
in thread XML round-trip with comments and prolog

Thanks. I have occasionally muddled through XPath terms for a very specific experiment, but it just doesn't stick with me, so I was hoping to avoid it. But I guess I'll try going down that path for this; maybe because I this will likely be more than a one-time script for me, I might remember more of the concepts (especially XPath) that I learn this time through.

The good news is, I can at least get a super-simple round-trip with comments:

... use XML::LibXML; my $dom = XML::LibXML->load_xml(string => $xml_doc); print $dom->toString(), "-----\n"; # works!

... so that's something. ;-)