Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: not well-formed (invalid token)

by Prior Nacre V (Hermit)
on Oct 04, 2004 at 07:51 UTC ( [id://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>);



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



        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. :)

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-05-22 14:25 GMT
Find Nodes?
    Voting Booth?

    No recent polls found