[xml] bad xmllint error message...



Hi,

first thanks for the cool stuff.
but i have the following problem:
when i do xmllint file.xml and i am missing an end tag in that file, i 
get a quite misleading error message. it doesn't even show the right 
piece of text where the problem is.
is it possible to have an error message like:
XML not well formed: </CATALOG> missing. Aborting.
( </CATALOG> only in this case of course...)

this would not mislead new users learning xml stuff.

thanks, Holger

example session follows:

holger whserv:~/xslt > cat 3.xml
<?xml version="1.0" encoding="UTF-8" ?>
<CATALOG>
  <CD>
    <TITLE>Empire Burlesque</TITLE>
    <ARTIST>Bob Dylan</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Columbia</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1985</YEAR>
  </CD>
holger whserv:~/xslt > xmllint 3.xml
3.xml:11: error: Premature end of data in tag <CATALOG>
  <CD>
    <TITLE>Em

^
holger whserv:~/xslt > cat 3.xml
<?xml version="1.0" encoding="UTF-8" ?>
<CATALOG>
  <CD>
    <TITLE>Empire Burlesque</TITLE>
    <ARTIST>Bob Dylan</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Columbia</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1985</YEAR>
  </CD>
</CATALOG>holger whserv:~/xslt > xmllint 3.xml
<?xml version="1.0" encoding="UTF-8"?>
<CATALOG>
  <CD>
    <TITLE>Empire Burlesque</TITLE>
    <ARTIST>Bob Dylan</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Columbia</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1985</YEAR>
  </CD>
</CATALOG>
holger whserv:~/xslt >




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