Package org.rumbledb.serialization
Class XmlSerializer
java.lang.Object
org.rumbledb.serialization.XmlSerializer
- All Implemented Interfaces:
Serializable,Serializer
- Direct Known Subclasses:
HtmlSerializer,XhtmlSerializer
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendAttributeOrNamespaceNode(Item item, StringBuilder sb) protected voidappendCDataText(String value, StringBuilder sb) protected voidappendDocTypeIfNeeded(Item element, StringBuilder sb) protected voidappendTextNode(Item item, StringBuilder sb) protected voidprotected booleancontainsElementLikeChild(List<Item> children) protected ItemcreateNamespaceNode(Item parent, String prefix, String uri) protected StringescapeAttribute(String value) protected StringescapeText(String value) getEffectiveNamespaceScope(Item element) protected StringgetEffectiveVersion(String defaultValue) getNamespaceNodesToSerialize(Item element) protected ItemgetParentElement(Item item) protected booleanhasSignificantTextChild(List<Item> children) protected booleanisCDataSectionElement(Item element) protected booleanisXml11()protected booleanmatchesElementNamespace(Item element, Item namespace) protected booleanmatchesExpandedQNameEntry(Set<String> entries, Item element) protected booleanmustPreserveWhitespace(Item element) protected StringnextIndent(String indent) protected StringprepareAttributeValue(Item attribute) protected RumbleExceptionserializationError(String message, String errorCode) voidserialize(Item item, StringBuilder sb, String indent, boolean isTopLevel) protected voidserializeDocumentNode(Item item, StringBuilder sb, String indent, boolean isTopLevel) protected voidserializeElementNode(Item item, StringBuilder sb, String indent, boolean isTopLevel) protected booleanshouldEmitNamespaceUndeclaration(String prefix, String previousUri, Item element) protected booleanshouldEmitXmlDeclaration(Item item) protected booleanshouldIndentBeforeChild(Item child) protected booleanshouldIndentElement(Item item) protected booleanshouldSerializeNamespace(String prefix, String uri) protected booleansupportsPrefixUndeclaration(Item element)
-
Field Details
-
params
-
-
Constructor Details
-
XmlSerializer
-
-
Method Details
-
serialize
- Specified by:
serializein interfaceSerializer
-
serialize
- Specified by:
serializein interfaceSerializer
-
serializeDocumentNode
protected void serializeDocumentNode(Item item, StringBuilder sb, String indent, boolean isTopLevel) -
serializeElementNode
-
appendTextNode
-
appendAttributeOrNamespaceNode
-
matchesElementNamespace
-
getNamespaceNodesToSerialize
-
shouldEmitNamespaceUndeclaration
-
supportsPrefixUndeclaration
-
getEffectiveNamespaceScope
-
getParentElement
-
createNamespaceNode
-
prepareAttributeValue
-
escapeAttribute
-
escapeText
-
shouldSerializeNamespace
-
shouldEmitXmlDeclaration
-
appendXmlDeclaration
-
appendDocTypeIfNeeded
-
getEffectiveVersion
-
isXml11
protected boolean isXml11() -
isCDataSectionElement
-
shouldIndentElement
-
mustPreserveWhitespace
-
matchesExpandedQNameEntry
-
containsElementLikeChild
-
hasSignificantTextChild
-
shouldIndentBeforeChild
-
nextIndent
-
appendCDataText
-
serializationError
-