public class TagCustomizeWriter extends Object implements XMLEventWriter
XMLEventWriter for JAXB marshaller in mixer2Engine.
This class has only implements for script tag. For example, the template has in-line javascript below.
<script type="text/javascript">
//<![CDATA[
if (1 > 0) { alert('foo');}
//]]>
</script>
Normal marshaling replace <,> into reference. This javascript can not work. This EventWriter prevent it.
if (a > 0) { alert('foo');} // this javascript can't work!
Also, this class is for external javascript.
<script type="text/javascript" src="foo.js"></script>
With the template above, normal marshaling outputs it as empty element. This code can not work on firefox as java-script.
<script type="text/javascript" src="foo.js" />
This class one white space into script tag.
<script type="text/javascript" src="foo.js">(one white space)</script>
| Constructor and Description |
|---|
TagCustomizeWriter(XMLEventWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(XMLEvent event) |
void |
add(XMLEventReader reader) |
void |
close() |
void |
flush() |
NamespaceContext |
getNamespaceContext() |
String |
getPrefix(String uri) |
void |
setDefaultNamespace(String uri) |
void |
setNamespaceContext(NamespaceContext context) |
void |
setPrefix(String prefix,
String uri) |
public TagCustomizeWriter(XMLEventWriter writer)
public void add(XMLEvent event) throws XMLStreamException
add in interface XMLEventConsumeradd in interface XMLEventWriterXMLStreamExceptionpublic void flush()
throws XMLStreamException
flush in interface XMLEventWriterXMLStreamExceptionpublic void close()
throws XMLStreamException
close in interface XMLEventWriterXMLStreamExceptionpublic void add(XMLEventReader reader) throws XMLStreamException
add in interface XMLEventWriterXMLStreamExceptionpublic String getPrefix(String uri) throws XMLStreamException
getPrefix in interface XMLEventWriterXMLStreamExceptionpublic void setPrefix(String prefix, String uri) throws XMLStreamException
setPrefix in interface XMLEventWriterXMLStreamExceptionpublic void setDefaultNamespace(String uri) throws XMLStreamException
setDefaultNamespace in interface XMLEventWriterXMLStreamExceptionpublic void setNamespaceContext(NamespaceContext context) throws XMLStreamException
setNamespaceContext in interface XMLEventWriterXMLStreamExceptionpublic NamespaceContext getNamespaceContext()
getNamespaceContext in interface XMLEventWriterCopyright © 2021 Project Mixer2. All rights reserved.