Fix for #314163 "E4X XML object constructed from an XML Beans XmlObject is not consistent with a literal (inline) E4X XML object"

This commit is contained in:
szegedia%freemail.hu 2006-07-11 12:52:35 +00:00
parent d02505e57c
commit f1e19754a9

View File

@ -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.
{