Re: [xml] XML Document Contains Unescaped Predefined Entities



Hi

XML docuement:

       <a>a's value
          <b>b's value <
             <c>& 's value</c>
          </b>
       </a>


Exception:

org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1078)
at SAXLocalNameCount.main(SAXLocalNameCount.java:284)

This was due to unquoted < character in element, <b>.

        You can't validate this document. You _must_ escape these
character _before_ create the document.

Need to setup a programmatic process to escape these characters.
> Thanks in advance for suggestions/work-arounds?

        What about asking xerces' mailing list about it's API
behaviour?? :))

--

[]'s
Lucas Brasilino
brasilino recife pe gov br
http://www.recife.pe.gov.br
Emprel -        Empresa Municipal de Informatica (pt_BR)
                Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078




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