Package org.htmlcleaner
Class XmlSerializer
- java.lang.Object
-
- org.htmlcleaner.Serializer
-
- org.htmlcleaner.XmlSerializer
-
- Direct Known Subclasses:
BrowserCompactXmlSerializer
,CompactXmlSerializer
,PrettyXmlSerializer
,SimpleXmlSerializer
public abstract class XmlSerializer extends Serializer
Abstract XML serializer - contains common logic for descendants.
-
-
Field Summary
-
Fields inherited from class org.htmlcleaner.Serializer
props
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XmlSerializer(CleanerProperties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
dontEscape(TagNode tagNode)
protected java.lang.String
escapeXml(java.lang.String xmlContent)
java.lang.String
getXmlAsString(TagNode tagNode)
Deprecated.Use getAsString() instead.java.lang.String
getXmlAsString(TagNode tagNode, java.lang.String charset)
Deprecated.Use getAsString() instead.protected boolean
isMinimizedTagSyntax(TagNode tagNode)
protected void
serializeEndTag(TagNode tagNode, java.io.Writer writer, boolean newLine)
protected void
serializeOpenTag(TagNode tagNode, java.io.Writer writer, boolean newLine)
void
writeXml(TagNode tagNode, java.io.Writer writer, java.lang.String charset)
Deprecated.Use write() instead.void
writeXmlToFile(TagNode tagNode, java.lang.String fileName)
Deprecated.Use writeToFile() instead.void
writeXmlToFile(TagNode tagNode, java.lang.String fileName, java.lang.String charset)
Deprecated.Use writeToFile() instead.void
writeXmlToStream(TagNode tagNode, java.io.OutputStream out)
Deprecated.Use writeToStream() instead.void
writeXmlToStream(TagNode tagNode, java.io.OutputStream out, java.lang.String charset)
Deprecated.Use writeToStream() instead.-
Methods inherited from class org.htmlcleaner.Serializer
getAsString, getAsString, getAsString, getAsString, isScriptOrStyle, serialize, write, write, writeToFile, writeToFile, writeToFile, writeToFile, writeToStream, writeToStream, writeToStream, writeToStream
-
-
-
-
Constructor Detail
-
XmlSerializer
protected XmlSerializer(CleanerProperties props)
-
-
Method Detail
-
writeXmlToStream
@Deprecated public void writeXmlToStream(TagNode tagNode, java.io.OutputStream out, java.lang.String charset) throws java.io.IOException
Deprecated.Use writeToStream() instead.- Throws:
java.io.IOException
-
writeXmlToStream
@Deprecated public void writeXmlToStream(TagNode tagNode, java.io.OutputStream out) throws java.io.IOException
Deprecated.Use writeToStream() instead.- Throws:
java.io.IOException
-
writeXmlToFile
@Deprecated public void writeXmlToFile(TagNode tagNode, java.lang.String fileName, java.lang.String charset) throws java.io.IOException
Deprecated.Use writeToFile() instead.- Throws:
java.io.IOException
-
writeXmlToFile
@Deprecated public void writeXmlToFile(TagNode tagNode, java.lang.String fileName) throws java.io.IOException
Deprecated.Use writeToFile() instead.- Throws:
java.io.IOException
-
getXmlAsString
@Deprecated public java.lang.String getXmlAsString(TagNode tagNode, java.lang.String charset) throws java.io.IOException
Deprecated.Use getAsString() instead.- Throws:
java.io.IOException
-
getXmlAsString
@Deprecated public java.lang.String getXmlAsString(TagNode tagNode) throws java.io.IOException
Deprecated.Use getAsString() instead.- Throws:
java.io.IOException
-
writeXml
@Deprecated public void writeXml(TagNode tagNode, java.io.Writer writer, java.lang.String charset) throws java.io.IOException
Deprecated.Use write() instead.- Throws:
java.io.IOException
-
escapeXml
protected java.lang.String escapeXml(java.lang.String xmlContent)
-
dontEscape
protected boolean dontEscape(TagNode tagNode)
-
isMinimizedTagSyntax
protected boolean isMinimizedTagSyntax(TagNode tagNode)
-
serializeOpenTag
protected void serializeOpenTag(TagNode tagNode, java.io.Writer writer, boolean newLine) throws java.io.IOException
- Throws:
java.io.IOException
-
serializeEndTag
protected void serializeEndTag(TagNode tagNode, java.io.Writer writer, boolean newLine) throws java.io.IOException
- Throws:
java.io.IOException
-
-