[XOM-interest] serializer.breakLine

Elliotte Harold elharo at ibiblio.org
Tue Jun 16 11:30:48 EDT 2009


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 at 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


More information about the XOM-interest mailing list