Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Custom Serializer?

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] Custom Serializer?
  • Date: Wed, 5 Aug 2009 14:03:15 -0700

On Wed, Aug 5, 2009 at 1:19 PM, Egon
Willighagen<egon.willighagen AT gmail.com> wrote:

>> In that case you may want to be writing elements rather than documents.
>
> Well, that was sort of what I was getting at, and since I did not find
> such, I used the aforementioned 'workaround'...:
>
> Can I format (read indent) Element(s) into a String with indentation,
> just like I can do with Serializer for documents?

Sure. Just write a subclass (which you're already doing) and make the
writeElement method public. You may want to be a little careful about
namespace declarations.

--
Elliotte Rusty Harold
elharo AT ibiblio.org




Archive powered by MHonArc 2.6.24.

Top of Page