Package com.ctc.wstx.api
Interface EmptyElementHandler
-
- All Known Implementing Classes:
EmptyElementHandler.HtmlEmptyElementHandler
,EmptyElementHandler.SetEmptyElementHandler
public interface EmptyElementHandler
Optional handler used to determine if a specific empty element (by name) should be allowed to use the self-closing syntax instead of having a separate end tag.- Since:
- 4.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EmptyElementHandler.HtmlEmptyElementHandler
HTML specific empty element handler.static class
EmptyElementHandler.SetEmptyElementHandler
Handler that uses a Set of Strings.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
allowEmptyElement(java.lang.String prefix, java.lang.String localName, java.lang.String nsURI, boolean allowEmpty)
-
-
-
Method Detail
-
allowEmptyElement
boolean allowEmptyElement(java.lang.String prefix, java.lang.String localName, java.lang.String nsURI, boolean allowEmpty)
- Parameters:
prefix
- The element's namespace prefix, null if not setlocalName
- The element's local namensURI
- The elements's namespace URI, null if not setallowEmpty
- The allow empty setting specified by the caller.- Returns:
- True if the empty element can be self-closing. False if a separate end tag should be written.
-
-