Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Order of children of the document node

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT ibiblio.org>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Order of children of the document node
  • Date: Thu, 25 Sep 2014 09:53:54 -0400

Is this a bug in XOM somehow? It sounds like it might be. Do you have a
simple test case?

On Wed, Sep 24, 2014 at 7:06 PM, Michael Kay <mike AT saxonica.com> wrote:

> I've found that my XOM builder class is creating children of the document
> node in the wrong order.
>
> The arrival order is (PI, Comment, Element). On the tree they appear as
> (Element, PI, Comment). The reason is that when the document node is
> created, a fake element child is created, and when the real outermost
> element is encountered, this replaces the fake element and thus appears
> before the PI and Comment.
>
> Any suggestions as to workaround? I can think of possible approaches, but
> none is simple, and all make adding the children of a document node very
> different from adding the children of an element node, which I would prefer
> to avoid.
>
>
> Michael Kay
> Saxonica
> mike AT saxonica.com
> +44 (0) 118 946 5893
>
>
>
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>



--
Elliotte Rusty Harold
elharo AT ibiblio.org




Archive powered by MHonArc 2.6.24.

Top of Page