Example usage for org.jdom2.output Format escapeAttribute

List of usage examples for org.jdom2.output Format escapeAttribute

Introduction

In this page you can find the example usage for org.jdom2.output Format escapeAttribute.

Prototype

public static final String escapeAttribute(final EscapeStrategy strategy, final String value) 

Source Link

Document

This will take the three pre-defined entities in XML 1.0 ('<', '>', and '&' - used specifically in XML elements) as well as CR/NL, tabs, and Quote characters which require escaping inside Attribute values and converts their character representation to the appropriate entity reference suitable for XML attribute content.

Usage

From source file:org.apache.wiki.render.CustomXMLOutputProcessor.java

License:Apache License

protected void attributeEscapedEntitiesFilter(final Writer out, final FormatStack fstack, final String value)
        throws IOException {

    write(out, Format.escapeAttribute(fstack.getEscapeStrategy(), value));

}