Hi there,
Let us assume I have the following document t.xml
<?xml version="1.0" encoding="utf-8"?>
<entry>
bla --> more bla
</entry>
Running xmllint t.xml gives a "corrected' output with >. instead of
.
However, xmllint doesn't return a non zero return code which means
(if I understand xmllint correctly) that from xmllint's point of view
the document is well formed.
Question: Is the above document really well formed? Or is it required
to have > instead of '>'?
.
In article <20170130213323.44a3c525@arcor.com>,
Manfred Lotz <manfred.lotz@arcor.de> wrote:
Hi there,
Let us assume I have the following document t.xml
<?xml version="1.0" encoding="utf-8"?>
<entry>
bla --> more bla
</entry>
Running xmllint t.xml gives a "corrected' output with >. instead
of
.
However, xmllint doesn't return a non zero return code which means
(if I understand xmllint correctly) that from xmllint's point of view
the document is well formed.
Question: Is the above document really well formed? Or is it required
to have > instead of '>'?
It's well formed.
There is one circumstance in which you must use > (or a character reference) instead of >, and that's when it's part of the sequence ]]>
and that sequence is not marking the end of a CDATA section. You're
unlikely to run into this in real life, but many programs always
output > anyway.
On Mon, 30 Jan 2017 21:07:14 +0000 (UTC)
richard@cogsci.ed.ac.uk (Richard Tobin) wrote:
In article <20170130213323.44a3c525@arcor.com>,
Manfred Lotz <manfred.lotz@arcor.de> wrote:
Hi there,
Let us assume I have the following document t.xml
<?xml version="1.0" encoding="utf-8"?>
<entry>
bla --> more bla
</entry>
Running xmllint t.xml gives a "corrected' output with >. instead
of
.
However, xmllint doesn't return a non zero return code which means
(if I understand xmllint correctly) that from xmllint's point of view
the document is well formed.
Question: Is the above document really well formed? Or is it required
to have > instead of '>'?
It's well formed.
Thanks. I thought it is but wasn't 100% sure.
There is one circumstance in which you must use > (or a character
reference) instead of >, and that's when it's part of the sequence ]]>
and that sequence is not marking the end of a CDATA section. You're
unlikely to run into this in real life, but many programs always
output > anyway.
Yes, that's an unlikely case in "normal life".
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 388 |
Nodes: | 16 (2 / 14) |
Uptime: | 134:23:52 |
Calls: | 8,209 |
Calls today: | 7 |
Files: | 13,122 |
Messages: | 5,871,468 |