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

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

by ikegami (Pope)
on Jul 24, 2014 at 17:23 UTC ( #1094943=note: print w/ replies, xml ) Need Help??

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

Vertical tabs (U+000B) are not allowed in XML documents.

Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

I don't know why I get a different error from the two inputs in your example, but I do get an error from both.

Update: Just noticed you knew U+000B isn't allowed in XML, in which case I don't get the question.

Comment on Re: Vertical Tab (\x0b) in XML::LibXML
Download Code
Replies are listed 'Best First'.
Re^2: Vertical Tab (\x0b) in XML::LibXML
by choroba (Canon) on Jul 24, 2014 at 17:39 UTC
    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.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      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;


        <?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.

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2015-11-28 03:23 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (737 votes), past polls