org.kite9.framework.serialization
Class XMLHelper.SchemaTypeUsingStaxProvider

java.lang.Object
  extended by com.thoughtworks.xstream.io.xml.AbstractXmlDriver
      extended by com.thoughtworks.xstream.io.xml.StaxDriver
          extended by org.kite9.framework.serialization.XMLHelper.SchemaTypeUsingStaxProvider
All Implemented Interfaces:
com.thoughtworks.xstream.io.HierarchicalStreamDriver
Enclosing class:
XMLHelper

protected static class XMLHelper.SchemaTypeUsingStaxProvider
extends com.thoughtworks.xstream.io.xml.StaxDriver

Enforces the use of xsi:type to identify between different xml entities, rather than the xstream default, 'class'. Also pretty-prints the xml produced on output to improve legibility in test results.

Author:
moffatr

Constructor Summary
XMLHelper.SchemaTypeUsingStaxProvider()
           
 
Method Summary
 com.thoughtworks.xstream.io.xml.AbstractPullReader createStaxReader(javax.xml.stream.XMLStreamReader in)
           
 com.thoughtworks.xstream.io.xml.StaxWriter createStaxWriter(javax.xml.stream.XMLStreamWriter out, boolean writeStartEndDocument)
           
 
Methods inherited from class com.thoughtworks.xstream.io.xml.StaxDriver
createParser, createParser, createReader, createReader, createStaxWriter, createWriter, createWriter, getInputFactory, getOutputFactory, getQnameMap, isRepairingNamespace, setQnameMap, setRepairingNamespace
 
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlDriver
xmlFriendlyReplacer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLHelper.SchemaTypeUsingStaxProvider

public XMLHelper.SchemaTypeUsingStaxProvider()
Method Detail

createStaxWriter

public com.thoughtworks.xstream.io.xml.StaxWriter createStaxWriter(javax.xml.stream.XMLStreamWriter out,
                                                                   boolean writeStartEndDocument)
                                                            throws javax.xml.stream.XMLStreamException
Overrides:
createStaxWriter in class com.thoughtworks.xstream.io.xml.StaxDriver
Throws:
javax.xml.stream.XMLStreamException

createStaxReader

public com.thoughtworks.xstream.io.xml.AbstractPullReader createStaxReader(javax.xml.stream.XMLStreamReader in)
Overrides:
createStaxReader in class com.thoughtworks.xstream.io.xml.StaxDriver


Copyright © 2011. All Rights Reserved.