New method for XML parsing error checking

6 views
Skip to first unread message

Alexander Obuhovich

unread,
Feb 12, 2011, 10:39:58 AM2/12/11
to In-Portal Development
Another new method (previous was about curl response error checking) for checking of xml document parsing ended with error.


Ready for testing.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
xml_parse_error_detection_method.patch

Dmitry A.

unread,
Feb 12, 2011, 12:08:13 PM2/12/11
to in-por...@googlegroups.com
Thanks for the patch!

Will test shortly.



DA

Dmitry A.

unread,
Sep 11, 2011, 11:24:19 PM9/11/11
to in-por...@googlegroups.com
Hi Alex,

What's a good test scenario here? Just test trying to parse valid and invalid XMLs, or something else should be checked?

DA

Alexander Obuhovich

unread,
Sep 13, 2011, 2:49:06 AM9/13/11
to in-por...@googlegroups.com

That's not just a bad xml that is checked by this method.

There could be the case when:
1. error source could not be detected during xml parsing and "false" (boolean) is returned instead of root node object of xml document;
2. error source could be detected and then xml node object with ERROR word as it's name is returned.

Then you need to test:
- very malformed (or maybe empty string as input) xml
- little bit malformed xml
- good xml.

Reply all
Reply to author
Forward
0 new messages