Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: not well-formed (invalid token)

by Prior Nacre V (Hermit)
on Oct 04, 2004 at 07:51 UTC ( #396144=note: print w/replies, xml ) Need Help??


in reply to not well-formed (invalid token)

Looks like a cut-n-paste error :-)

In the four places that you have:

my $cat = (<DATA>);

Change it to:

$cats = (<DATA>);

Regards,

PN5

Replies are listed 'Best First'.
Re^2: not well-formed (invalid token)
by Maxim (Sexton) on Oct 04, 2004 at 08:42 UTC
    It won't work what you suggest but I found the error from a FAQ. It is from the encoding declaration. XML::SIMPLE doesn't like this:
    <?xml version='1.0' encoding="iso-8859-1"?>

    But he likes this:
    <?xml version='1.0' encoding='iso-8859-1'?> or <?xml version="1.0" encoding='iso-8859-1'?>

    Very tricky. Becareful of the encoding guys

      I'm not sure if you're aware of the pointless processing occurring at these four lines. The data assigned to $cat are immediately lost because this variable immediately goes out of scope. This may not be a typo, as I suggested, but it is definitely an issue you should address.

      The problem you describe with XML::Simple indicates non-conformance with the published XML Specification. If you are absolutely certain about this, consider advising the module's author(s).

      Regards,

      PN5

        I already replaced what you just suggest to me before I came back here and worked well. But XML::simplestill complains about the encode. So since I found what was the prob about the encode and after I debugged. It's good now.
        But Thanks for you suggestion. I appreciate. :)
        Maxim

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2022-05-25 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?