XML into text node

Mark Overmeer <[email protected]> Wed, 14 Oct 2015 13:22:17 +0200
Newsgroups gmane.comp.lang.perl.xml
Organization MARKOV Solutions
Message-ID <[email protected]>
Hi All,

I am new on this list... and author of all XML::Compile modules.
(XML::LibXML based)  Can anyone help me with this problem?

XML::LibXML is so well integrated in Perl, that it expects all values to
be Perl strings.  So, when used they get entity encoded.  But now I have
a "mixed" element to create from a string of unknown source.  The string
is already serialized XML.  How do I get it into an XML::LibXML::Element
without parsing it?

With parsing:

    my $frag = XML::LibXML->new
       ->parse_balanced_chunk(encode utf8 => $content);
    $node = $frag->firstChild;

I do not want it to get parsed, because the fragment can be huge (whole
html documents)  I cannot use CDATA, because the receiver will see this
as parsable XML.

I need something like $doc->createTextNode where the text does not get
entity encoded.  Any idea?
-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       [email protected]                          [email protected]
http://Mark.Overmeer.net                   http://solutions.overmeer.net

_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs