[xml] SAX Parser error message



Hi,

I use libxml which is a great library for a xml description file parsing
but I have a suggestion about an error message.

SAX error messages are truncated to 30 characters (centered from the
tag) which appears not clean to the user when tag is bigger (especially
messages written when "Unexpected end of data ")

libXML version I use is 2.4.1 compiled for SOLARIS with gcc-2.95.2

Exemple of erronous XML file which show the problem:

<?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
<all>
<tag1 name="name_tag1" id1="op1" id2="op2" id3="op3" id4="op4">
  <tag2>blablable
  <tag3>blablabla</tag3>

<tag2>

(Output with xmllint [but also the same with my own parser]):
/udd/ksoulaba/xml/test/test-libxml/essai.xml:9: error: Premature end of
data in tag <tag2>
^

/udd/ksoulaba/xml/test/test-libxml/essai.xml:9: error: Premature end of
data in tag <tag2>blablable
  <tag3>blabla

^
/udd/ksoulaba/xml/test/test-libxml/essai.xml:9: error: Premature end of
data in tag <tag1 name="name_tag1" id1="op

^
/udd/ksoulaba/xml/test/test-libxml/essai.xml:9: error: Premature end of
data in tag <all>
<tag1 name="name_tag1" i

^

The result I will expected was:
        error.xml: error: premature end of data in tag <tag2>
        error.xml: error: premature end of data in tag <tag3>
        error.xml: error: premature end of data in tag <tag1 name="name_tag1"
id1="op1" id2="op2" id3="op3" id4="op4">


I will expecting that full tag are written but without any subtag
content.

It may be more easier to understand for user.

Thank you.

Karl Soulabaille
-- 
IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 71 00, Fax: +33 (0) 2 99 84 71 71




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]