[jdom-interest] Problem with getMixedContent()

Alex Rosen arosen at silverstream.com
Thu Oct 11 11:45:07 PDT 2001


This is an inherent problem with the scheme used by PartialList. The new
improved scheme, FilterList, is currently being worked on. If I remember
correctly, the workaround is to do something like:

List children = parent.getMixedContent();
// manipulate the children list.
parent.setMixedContent(new ArrayList());
parent.setMixedContent(children);

Alex

> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Nestel, Frank
> Sent: Thursday, October 11, 2001 12:34 PM
> To: 'jdom-interest at jdom.org'; Schindelin, Christian; Nestel, Frank
> Subject: [jdom-interest] Problem with getMixedContent()
>
>
> Hi,
>
> I think I've found a problem in JDOM-b7, if it is a FAQ, please
> ignore. If there is a patch, could you send me a note? CVS is
> blocked by our firewall and browsing through the WebCVS is very
> slow going from here. Zipfiles and archives are currently
> blocked by our company firewall due to Nimda fear.
>
> Problem: When I'm working with the Lists returned by
> getMixedContent(), I cannot control well the position of
> inserts when I'm inserting on a Text node. The matching in line 346
>
>      backingList.add(backingList.indexOf(get(index)), current);
>
> in PartialList.java finds the first matching String with a certain
> text, if there is more than one node in the XML-instance with
> that particular text, I can only add nodes ahead of the first
> of those text nodes. This is probably due to to much String
> interning which on the other side might be necessary for
> performance reasons.
>
> If there is no fix, you'd might recommend me a known
> workarround?!
>
> Thank you very much.
>
> Frank Nestel
>
> --
> Dr. Frank Sven Nestel
> Principal Software Engineer
>
> COI GmbH    Erlanger Straße 62, D-91074 Herzogenaurach
> Phone +49 (0) 9132 82 4611
> http://www.coi.de, mailto:Frank.Nestel at coi.de
>           COI - Solutions for Documents
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com




More information about the jdom-interest mailing list