Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR when data contains "<" or ">". [rt.cpan.org #115976] #54

Open
toddr opened this issue Sep 24, 2019 · 1 comment
Open

ERROR when data contains "<" or ">". [rt.cpan.org #115976] #54

toddr opened this issue Sep 24, 2019 · 1 comment

Comments

@toddr
Copy link
Member

toddr commented Sep 24, 2019

Migrated from rt.cpan.org#115976 (status was 'new')

Requestors:

From [email protected] on 2016-07-08 11:08:35
:

Customer does not have an XML editor that validates data and there was a typo in XML data and I got this error: 

"not well-formed (invalid token) at line 15, column 39, byte 616 at /usr/lib/perl5/XML/Parser.pm line 187.". 

I was using XML::Simple 2.20 but the error actually came from XML::Parser. This was the XML data that had the error: 

<StreetOne>221 <atteson Ct.</StreetOne>

Seems like there is no way for me, the programmer, to check the data because this is an error from the parsing step, before the data in the object is populated. Keep in mind that not every user has an XML editor that validates XML. 

IDEA: If an opening tag "<" symbol appears and there is no tag close ">" on the same line, or there is the incorrect number of closing symbols ">", there's probably something wrong with that line. 

For testing create a very simple XML file with that typo above, like: 

<base>
<StreetOne>221 <atteson Ct.</StreetOne>
</base>


From [email protected] on 2016-07-08 11:10:44
:

Version of XML::Parser I used: 2.41. 
@toddr
Copy link
Member Author

toddr commented Sep 24, 2019

It sounds like you're asking for a better error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant