Message686

Author nobody
Recipients
Date 2002-07-15.17:05:43
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
4DOM creates an incorrect DOM tree when you have 
text before the first child tag:

<parent>
   some text
   <child>
   <child>
   ...
</parent>

eg:
test.xml:
<test>Some <b>text</b> here</test>

Jython 2.1 on java1.4.0-beta3 (JIT: null)
Type "copyright", "credits" or "license" for more 
information.
>>> from xml.dom.ext.reader import Sax2
>>> reader = Sax2.Reader()
>>> doc = reader.fromStream("test.xml")

xml.dom.ext.PrettyPrint(doc) gives out:

<test>
  <b>Some text</b> here</test>

As you can see it combines the first text node with the 
content of <b> as the value of <b>. 

Python correctly returns
<test>
  Some
    <b>text</b>
  here
</test>


History
Date User Action Args
2008-02-20 17:17:07adminlinkissue581785 messages
2008-02-20 17:17:07admincreate