lux.xml
Class Serializer
java.lang.Object
lux.xml.Serializer
- All Implemented Interfaces:
- StAXHandler
public class Serializer
- extends Object
- implements StAXHandler
Accumulates a serialized XML document from StAX events according to a prescribed set of conventions,
as follows:
Line endings are normalized; CDATA blocks are preserved; entities and numeric references are preserved; redundant namespace
declarations are dropped. Comments and processing instructions are preserved.
No XML declaration is emitted. DOCTYPE declarations are preserved, but not the DTD internal subset.
Empty elements are represented with both open and close tags.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Serializer
public Serializer()
getDocument
public String getDocument()
handleEvent
public void handleEvent(XMLStreamReader r,
int evtType)
- Consume the XML stream, saving text to the document buffer.
- Specified by:
handleEvent in interface StAXHandler
- Parameters:
r - source of xml StAX eventsevtType - the type of StAX event
reset
public void reset()
- Description copied from interface:
StAXHandler
- reinitialize any internal state and prepare the handler for re-use
- Specified by:
reset in interface StAXHandler
Copyright © 2013. All Rights Reserved.