Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Confusion ,XML::SIMPLE with DATA:DUMPER

by ultibuzz (Monk)
on Nov 20, 2006 at 22:20 UTC ( [id://585158]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Confusion ,XML::SIMPLE with DATA:DUMPER
in thread Confusion ,XML::SIMPLE with DATA:DUMPER

i forgot to xopy the firstline of the main file
<?xml version="1.0" encoding="ISO-8859-1"?>
is what is standing there
with this in the testfile the error is gone

this file is in kinda good shape, sometimes we get files i can't even say what is waht but we need to live with that ;/

Replies are listed 'Best First'.
Re^5: Confusion ,XML::SIMPLE with DATA:DUMPER
by Joost (Canon) on Nov 20, 2006 at 22:46 UTC
    this file is in kinda good shape, sometimes we get files i can't even say what is waht but we need to live with that ;/
    In my experience it's always better to not accept any XML file that isn't well-formed - that's the official recommendation for XML parsers anyway. Trying to retoactively fix a non wellformed file always leads to trouble. Getting whoever creates the files to fix their process to create real XML files (instead of files that only look like XML) is always a better choice.

    update:

    i forgot to xopy the firstline of the main file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    is what is standing there with this in the testfile the error is gone
    I'm not 100% sure, but if I read the source of your original post correctly, the original XML file isn't in iso-8859-1 but some form of unicode encoding. probably utf-8. That would also explain why copying the file in an editor works, since that can change the encoding.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found