Re: [xml] xmllint simple validation fail



Anthony Viallard wrote:
Hello everybody,

i have some problems with xmllint. I use it to validate the syntax of
xml file. But with this xml bellow, which have one error, xmllint say
"all is ok".

<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="ok" version="1.0">
<lan ip_addr="192.168.9.1"/>" netmask="255.255.255.0" />
</rsp>

This file has no errors.  It may not be what you want, but it is
perfectly well-formed.

There is no rule in XML against quotation mark or greater-than sign
showing up in character content.

If you want rules that are stricter than well-formedness, you could use
a DTD or schema to say what content model is allowed; that is what they
are for.

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
âAll I ask of living is to have no chains on me,
 And all I ask of dying is to go naturally.â â Laura Nyro
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319



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