Package com.thoughtworks.xstream.io.xml

Examples of com.thoughtworks.xstream.io.xml.DomDriver


    }

    public DriverEndToEndTestSuite() {
        super(DriverEndToEndTestSuite.class.getName());
        addDriverTest(new Dom4JDriver());
        addDriverTest(new DomDriver());
        addDriverTest(new JDomDriver());
        addDriverTest(new StaxDriver());
        addDriverTest(new XppDomDriver());
        addDriverTest(new XppDriver());
        addDriverTest(new XomDriver());
View Full Code Here


* @see DomDriver
*/
public class XStreamDom extends XStreamDriver {

    public XStreamDom() {
        super(new DomDriver(), "XML with DOM parser");
    }
View Full Code Here

        sm.addPermission(source, new NetPermission("specifyStreamHandler"));
        sm.addPermission(source, new ReflectPermission("suppressAccessChecks"));
        sm.setReadOnly();
        System.setSecurityManager(sm);

        xstream = new XStream(new PureJavaReflectionProvider(), new DomDriver());

        assertBothWays();
    }
View Full Code Here

    }

    public EncodingTestSuite() {
        super(EncodingTestSuite.class.getName());
        addDriverTest(new Dom4JDriver());
        addDriverTest(new DomDriver());
        addDriverTest(new JDomDriver());
        addDriverTest(new StaxDriver());
        addDriverTest(new XppDomDriver());
        addDriverTest(new XppDriver());
        addDriverTest(new XomDriver());
View Full Code Here

        assertEquals(expectedXml, xstream.toXML(new Software("ms", "word")));
    }
   
    public void testOwnMapperChainCanBeRegistered() {
        Mapper mapper = new DefaultMapper(getClass().getClassLoader());
        xstream = new XStream(new PureJavaReflectionProvider(), new DomDriver(), getClass().getClassLoader(), mapper);
       
        String expected = "" +
                "<com.thoughtworks.acceptance.objects.Software>\n" +
                "  <vendor>ms</vendor>\n" +
                "  <name>word</name>\n" +
View Full Code Here

  /**
   * Create new XMLPropertiesDescriptionManager
   */
  public XMLPropertiesDescriptionManager() {
    propDescs = new ArrayList<PropertyDescription>();
    xstream = new XStream(new DomDriver());
    xstream.alias("PropertiesDescriptions", List.class);
    xstream.alias("PropertyDescription", PropertyDescription.class);
  }
View Full Code Here

  /**
   * Create a new XMLValueTypeDescriptionManager
   */
  public XMLValueTypeDescriptionManager() {
    vTypes = new ArrayList<ValueTypeDescription>();
    xstream = new XStream(new DomDriver());
    xstream.alias("ValueTypesDescriptions", List.class);
    xstream.alias("ValueTypeDescription", ValueTypeDescription.class);
    xstream.alias("FieldDescription", FieldDescription.class);
  }
View Full Code Here

                    }

                    @Override
                    public void notifyParseResult(ModuleNode moduleNode) {
                        if (opts.showAST) {
                            System.err.println(new XStream(new DomDriver()).toXML(moduleNode));
                        }
                    }
                };
                File result = createTempFile("test");
                XMLQueryCompiler compiler = new XMLQueryCompiler(listener);
View Full Code Here

    xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_REVIEW, review);
    xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_PREPARE_MODE, prepareMode);

    try
    {
      xstream.unmarshal(new DomDriver().createReader(new InputStreamReader(stream, "UTF-8")), null, xstreamDataHolder);
    }
    catch (Exception e)
    {
      LOGGER.warn(e);
      throw new RevuException(e);
View Full Code Here

        XStreamUtils.writeUtf8ToFile(this, xStream, file);
    }
   
    private static XStream createXStreamForFile(String name) {
       
        XStream xStream = new XStream(new DomDriver());
       
        // The last registered alias wins when resolving from class to name
        // We register both aliases, but the one that should be used for writing as the last
        if (name.equals(DesignDirectory.DESIGN_DEFINITION_FILE)) {
            xStream.alias("DesignSyncInfo", DesignDefinition.class);
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.io.xml.DomDriver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.