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 <[email protected]>,
Manfred Lotz <[email protected]> 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)
[email protected] (Richard Tobin) wrote:
In article <[email protected]>,
Manfred Lotz <[email protected]> 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: | 714 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 138:18:45 |
| Calls: | 12,087 |
| Files: | 14,997 |
| Messages: | 6,517,398 |