Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Vertical Tab (\x0b) in XML::LibXML

by choroba (Abbot)
on Jul 24, 2014 at 17:39 UTC ( #1094944=note: print w/ replies, xml ) Need Help??


in reply to Re: Vertical Tab (\x0b) in XML::LibXML
in thread Vertical Tab (\x0b) in XML::LibXML

When the encoding is specified, toString generates invalid XML without any error. In real life, this gets sent to a different XML processor that chokes on it. My question is why the behaviour is different, and whether there is something that should prevent me from submitting a bug report.

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^2: Vertical Tab (\x0b) in XML::LibXML
Re^3: Vertical Tab (\x0b) in XML::LibXML
by ikegami (Pope) on Jul 25, 2014 at 04:04 UTC
    I get an error for that too.
      #!/usr/bin/perl use warnings; use strict; use XML::LibXML; my $doc = 'XML::LibXML::Document'->createDocument('1.0', 'utf-8'); $doc->setDocumentElement(my $root = $doc->createElement('root')); $root->appendText("\x0b"); print $doc->toString;

      Output:

      <?xml version="1.0" encoding="utf-8"?> <root> </root>

      No errors, no warnings. Maybe a different version of the underlying C library?

      Update: Thanks anonymous. 2.9.1, 2.0018 here.

      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

        I am me I am

        #!/usr/bin/perl -- use warnings; use strict; use XML::LibXML; print join "\n", XML::LibXML::LIBXML_DOTTED_VERSION(), XML::LibXML::LIBXML_VERSION(), XML::LibXML::LIBXML_RUNTIME_VERSION(), $XML::LibXML::VERSION, ;;;; my $doc = 'XML::LibXML::Document'->createDocument('1.0', 'utf-8'); $doc->setDocumentElement(my $root = $doc->createElement('root')); $root->appendText("\x0b"); print $doc->toString; __END__ 2.9.0 20900 20900 2.0014<?xml version="1.0" encoding="utf-8"?> <root> </root>

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-12-20 21:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (99 votes), past polls