Kbase P165854: DOM parser fails to add a non-breaking space ( or  ) to an XML document as an ENTITY-REFE
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/12/2010 |
|
Status: Unverified
SYMPTOM(s):
DOM parser fails to add a non-breaking space ( or  ) to an XML document as an ENTITY-REFERENCE
DOM parser fails to add ENTITY-REFERENCEs to an XML document
DOM parser appears to do nothing; no changes visible in the generated XML document
Using #160 fails with errors 9082 and 9102
X-NODEREF or X-DOCUMENT <method-name> got an error: <xml-exception>. (9082)
X-NODEREF or X-DOCUMENT CREATE-NODE got an error: An invalid character was specified. (9082)
X-NODEREF must be associated with a valid X-DOCUMENT in order to use it in method <method>. (9102)
X-NODEREF must be associated with a valid X-DOCUMENT in order to use it in method APPEND-CHILD. (9102)
Using nbsp does nothing
/* Sample code to reproduce */
DEFINE VAR lhDoc AS HANDLE NO-UNDO.
DEFINE VAR lhHtml AS HANDLE NO-UNDO.
DEFINE VAR lhBody AS HANDLE NO-UNDO.
DEFINE VAR lhSpan AS HANDLE NO-UNDO.
DEFINE VAR lhNbsp AS HANDLE NO-UNDO.
CREATE X-DOCUMENT lhDoc.
CREATE X-NODEREF lhHtml.
CREATE X-NODEREF lhBody.
CREATE X-NODEREF lhSpan.
CREATE X-NODEREF lhNbsp.
lhDoc:LOAD("FILE", "source.xml", FALSE).
lhDoc:GET-DOCUMENT-ELEMENT(lhHtml).
lhHtml:GET-CHILD(lhBody, 1).
lhBody:GET-CHILD(lhSpan, 1).
/* lhDoc:CREATE-NODE(lhNbsp, "#160", "ENTITY-REFERENCE"). */
lhDoc:CREATE-NODE(lhNbsp, "nbsp", "ENTITY-REFERENCE").
lhSpan:APPEND-CHILD(lhNbsp).
lhDoc:SAVE("FILE", "dest.xml").
FACT(s) (Environment):
DOM parser fails to add a ampersand (&) to an XML document as an ENTITY-REFERENCE
DOM parser fails to add "less than" (<) and "greater than" (>) to an XML document as an ENTITY-REFERENCE
Using the equivalent code in MS Visual Basic 6 did cause changes in the XML document
OpenEdge 10.1x
OpenEdge 10.2x
All Supported Operating Systems
CAUSE:
Bug# OE00197375
FIX:
None at this time