You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by SD <ap...@telus.net> on 2004/12/23 05:18:53 UTC
Added setSavePrettyPrintDoNotTrim
I found that the setSavePrettyPrint option was doing the pretty
printing well but was also removing whitespace from values within my
xml tags. I added the option setSavePrettyPrintDoNotTrim to prevent
trimming the text in the xml tags. Here is the cvs diff for the
changes I made if someone would like to commit the changes.
Index: src/xmlpublic/org/apache/xmlbeans/XmlOptions.java
===================================================================
RCS file:
/home/cvspublic/xml-xmlbeans/v1/src/xmlpublic/org/apache/xmlbeans/XmlOptions.java,v
retrieving revision 1.5
diff -r1.5 XmlOptions.java
86a87,90
> public XmlOptions setSavePrettyPrintDoNotTrim() {
> return set( SAVE_PRETTY_PRINT_DO_NOT_TRIM );
> }
>
571a576,577
> /** @exclude */
> public static final String SAVE_PRETTY_PRINT_DO_NOT_TRIM =
>"SAVE_PRETTY_PRINT_DO_NOT_TRIM";
------------------------------------------------------------
Index: src/xmlstore/org/apache/xmlbeans/impl/store/Saver.java
===================================================================
RCS file:
/home/cvspublic/xml-xmlbeans/v1/src/xmlstore/org/apache/xmlbeans/impl/store/Saver.java,v
retrieving revision 1.9
diff -r1.9 Saver.java
139a140,141
> _prettyPrintDoNotTrim = options.hasOption(
>XmlOptions.SAVE_PRETTY_PRINT_DO_NOT_TRIM );
>
663c665,666
< trim( _text );
---
> if(!_prettyPrintDoNotTrim)
> trim( _text );
4721a4725
> private boolean _prettyPrintDoNotTrim;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org