in reply to XML parser error

XML::Filter::XInclude appears to be a little too naïve. If the included XML use the same encoding as the including XML, I'd try removing the <?xml?> line from the included XML. If that doesn't work, you'll have to get the bug fixed, switch to UTF-8, or find an alternative solution. Either way, you should report the bug.

By the way, you said you're using Perl 5.8.9, but the message implies you're using 5.12.1??

Replies are listed 'Best First'.
Re^2: XML parser error
by joeperl (Acolyte) on Jun 19, 2010 at 11:57 UTC

    i tried switching to UTF-8 ,still the problem persists

      Switching to UTF-8 was to be done after and in addition to removing the <?xml?> directive from the included XML, if needed.

      You'll definitely get that warning as long as the <?xml?> line is in the included XML due to the bug. I was trying to foresee and fix problems you might have after removing the directive. You might have problems parsing an included file without its <?xml?> directive if it's not encoded using UTF-8. You might have problems including a file into a document that has a different encoding than the included file (but probably not).

      It's probably a good idea to use UTF-8 everywhere anyway, if you have a choice.

        Hi,
        Correct if my understanding is wrong.
        You say that the UTF-8 can be used as below ?

        <record xmlns:xi="http://www.w3.org/2001/XInclude" encoding="ISO-8859- +1"> <module type="record" name="module_a"> <data>data</data> <data>data</data> </module> </record>