Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Modifiers | Name | Description |
---|---|---|
protected class |
XmlNodePrinter.NamespaceContext |
Modifiers | Name | Description |
---|---|---|
protected IndentPrinter |
out |
Constructor and description |
---|
XmlNodePrinter
(PrintWriter out) |
XmlNodePrinter
(PrintWriter out, String indent) |
XmlNodePrinter
(PrintWriter out, String indent, String quote) |
XmlNodePrinter
(IndentPrinter out) |
XmlNodePrinter
(IndentPrinter out, String quote) |
XmlNodePrinter
() |
Type | Name and description |
---|---|
String |
getQuote() Get Quote to use when printing attributes. |
boolean |
isExpandEmptyElements() Whether empty elements are expanded from <tagName/> to <tagName></tagName>. |
boolean |
isNamespaceAware() Check if namespace handling is enabled. |
boolean |
isPreserveWhitespace() Check if whitespace preservation is enabled. |
void |
print(Node node) |
protected void |
print(Node node, XmlNodePrinter.NamespaceContext ctx) |
protected void |
printLineBegin() |
protected void |
printLineEnd() |
protected void |
printLineEnd(String comment) |
protected void |
printList(List list, XmlNodePrinter.NamespaceContext ctx) |
protected void |
printName(Node node, XmlNodePrinter.NamespaceContext ctx, boolean begin, boolean preserve) |
protected void |
printNameAttributes(Map attributes, XmlNodePrinter.NamespaceContext ctx) |
protected void |
printNamespace(Object object, XmlNodePrinter.NamespaceContext ctx) |
protected void |
printSimpleItem(Object value) |
protected boolean |
printSpecialNode(Node node) |
void |
setExpandEmptyElements(boolean expandEmptyElements) Whether empty elements are expanded from <tagName/> to <tagName></tagName>. |
void |
setNamespaceAware(boolean namespaceAware) Enable and/or disable namespace handling. |
void |
setPreserveWhitespace(boolean preserveWhitespace) Enable and/or disable preservation of whitespace. |
void |
setQuote(String quote) Set Quote to use when printing attributes. |
Get Quote to use when printing attributes.
Whether empty elements are expanded from <tagName/> to <tagName></tagName>.
true
, if empty elements will be represented by an opening tag
followed immediately by a closing tag. Check if namespace handling is enabled.
Defaults to true
.
Check if whitespace preservation is enabled.
Defaults to false
.
Whether empty elements are expanded from <tagName/> to <tagName></tagName>.
expandEmptyElements
- if true
, empty
elements will be represented by an opening tag
followed immediately by a closing tag.
Defaults to false
.Enable and/or disable namespace handling.
namespaceAware
- the new desired valueEnable and/or disable preservation of whitespace.
preserveWhitespace
- the new desired valueSet Quote to use when printing attributes.
quote
- the quote characterCopyright © 2003-2015 The Apache Software Foundation. All rights reserved.