P
Peter Makholm
For a project I receive some XML fragments from a data base and have
to include it in a larger XML document created with XML::LibXML. With
version 1.66 of XML::LibXML I was able to to something like
my $doc = XML::LibXML:
ocument->new('1.0', 'utf-8' );
my $root = $doc->createElement("X:root");
$doc->setDocumentElement($root);
my $node = XML::LibXML->new()->parse_balanced_chunk(
'<owner>[email protected]</owner>'
);
$doc->adoptNode($node);
$root->addChild($node);
But with version 1.70 of XML::LibXML this fails with an error saying
'Adding document fragments with addChild not supported!'
Is there a working way to implement this?
//Makholm
to include it in a larger XML document created with XML::LibXML. With
version 1.66 of XML::LibXML I was able to to something like
my $doc = XML::LibXML:
my $root = $doc->createElement("X:root");
$doc->setDocumentElement($root);
my $node = XML::LibXML->new()->parse_balanced_chunk(
'<owner>[email protected]</owner>'
);
$doc->adoptNode($node);
$root->addChild($node);
But with version 1.70 of XML::LibXML this fails with an error saying
'Adding document fragments with addChild not supported!'
Is there a working way to implement this?
//Makholm