[Pharo-dev] XMLParser changes

Norbert Hartl norbert at hartl.name
Mon Apr 25 06:30:03 EDT 2016


> Am 25.04.2016 um 12:14 schrieb Cyril Ferlicot Delbecque <cyril.ferlicot at gmail.com>:
> 
> Hi,
> 
> last week there was a new stable version of XMLParser and some tests
> broke in some tools. I think that there was a regression in this version.
> 
> Snippet:
> 
> (XMLDOMParser parse: '<?xml version="1.0" encoding="UTF-8"?>
> <!--clones description file-->
> <Clones>
>    <ClonedFragment cloneName="test">
>        <Member fileName="ProgramA"/>
>        <Member fileName="ProgramB"/>
>    </ClonedFragment>
>    <ClonedFragment cloneName="test2">
>        <Member fileName="ProgramA"/>
>        <Member fileName="ProgramB"/>
>    </ClonedFragment>
> </Clones>') elements first nodes
> 
> With the release 2.7.4 we get 2 nodes but in release 2.7.6 we get 5
> nodes. The 2 previous ones and 3 empty String nodes.
> 
> I think this is not what we expect. Correct me if I am wrong :)

It is right. There is no characters to be skipped. These must all resolve to text nodes with the whitespace characters in it. The behaviour of the new version is correct. So if you indent XML documents you might change the structure.  The property should give control over that behaviour is called PreserveWhiteSpace.

Norbert


More information about the Pharo-dev mailing list