xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Harold <elharo AT ibiblio.org>
- To: XOM interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] serializer.breakLine
- Date: Tue, 16 Jun 2009 08:30:48 -0700
1. Please send replies to the xom-interest mailing list.
2. The JavaDoc says:
breakLine
protected final void breakLine()
throws IOException
Writes the current line break string onto the underlying output
stream and indents as specified by the current level and the indent
property.
Throws:
IOException - if the underlying output stream encounters an I/O error
I'm not sure what else you want. This method is meant for custom
serializers subclassing nu.xom.Serializer to use. No one else should
need it. That's why it's protected.
On Tue, Jun 16, 2009 at 8:00 AM, Dave Pawson<dave.pawson AT gmail.com> wrote:
> 2009/6/16 Elliotte Harold <elharo AT ibiblio.org>:
>> On Tue, Jun 16, 2009 at 7:37 AM, Dave Pawson<dave.pawson AT gmail.com> wrote:
>>> http://www.xom.nu/apidocs/nu/xom/Serializer.html documents breakLine
>>> method.
>>>
>>> Compile it and I see
>>>
>>> [dpawson@marge2 java]$ javac -classpath /myjava/XOM/xom-1.2.1.jar
>>> xomTest.java
>>> xomTest.java:75: breakLine() has protected access in nu.xom.Serializer
>>> serializer.breakLine();
>>> ^
>>> 1 error
>>>
>>>
>>>
>>> How to I get a 'pretty printed' ~XML output please?
>>>
>>
>> Just set the various options on the serializer and then pass the
>> Document object to the write() method. YOu don't need to call break
>> explicitly.
>
> Sorry, I was unclear.
>
> The documentation has no mention of the method being protected etc?
> Yet the compiler complains?
>
> I am getting the output file indented, just that I was printing the
> Document.toXML () result :-(
>
>
> regards
>
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> Docbook FAQ.
> http://www.dpawson.co.uk
>
--
Elliotte Rusty Harold
elharo AT ibiblio.org
-
[XOM-interest] serializer.breakLine,
Dave Pawson, 06/16/2009
-
Re: [XOM-interest] serializer.breakLine,
Elliotte Harold, 06/16/2009
-
Message not available
-
Re: [XOM-interest] serializer.breakLine,
Elliotte Harold, 06/16/2009
- Re: [XOM-interest] serializer.breakLine, Dave Pawson, 06/16/2009
-
Re: [XOM-interest] serializer.breakLine,
Elliotte Harold, 06/16/2009
-
Message not available
-
Re: [XOM-interest] serializer.breakLine,
Elliotte Harold, 06/16/2009
Archive powered by MHonArc 2.6.24.