From 885b8b4e97018ad12a6e7bb04c5c20b571cc073a Mon Sep 17 00:00:00 2001 From: "szegedia%freemail.hu" Date: Tue, 11 Jul 2006 12:52:35 +0000 Subject: [PATCH] Fix for #314163 "E4X XML object constructed from an XML Beans XmlObject is not consistent with a literal (inline) E4X XML object" --- .../xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java b/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java index a9a29b5ea5e..7e872f70504 100644 --- a/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java +++ b/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java @@ -237,6 +237,10 @@ class XML extends XMLObjectImpl { XScriptAnnotation anno; XmlCursor curs = xo.newCursor(); + if (curs.currentTokenType().isStartdoc()) + { + curs.toFirstContentToken(); + } try { anno = new XScriptAnnotation(curs); curs.setBookmark(anno); @@ -710,7 +714,11 @@ todo need to handle namespace prefix not found in XML look for namespace type in { copyCurs = xo.newCursor(); copyCurs.toFirstContentToken(); - + if (cursToCopy.currentTokenType() == XmlCursor.TokenType.STARTDOC) + { + cursToCopy.toNextToken(); + } + cursToCopy.copyXml(copyCurs); if (!cursToCopy.toNextSibling()) // If element skip element. {