Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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.

Replies are listed 'Best First'.
Re^2: Vertical Tab (\x0b) in XML::LibXML
by choroba (Bishop) 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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2018-03-17 13:27 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (224 votes). Check out past polls.