All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.imsweb.validation.internal.xml.StandaloneSetXmlDriver Maven / Gradle / Ivy

Go to download

This framework allows edits to be defined in Groovy and to be executed on various data types.

There is a newer version: 021-11
Show newest version
/*
 * Copyright (C) 2021 Information Management Services, Inc.
 */
package com.imsweb.validation.internal.xml;

import java.io.Writer;

import org.xmlpull.v1.XmlPullParser;

import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import com.thoughtworks.xstream.io.xml.AbstractXppDriver;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder;

import io.github.xstream.mxparser.MXParser;

public class StandaloneSetXmlDriver extends AbstractXppDriver {

    /**
     * Construct.
     */
    public StandaloneSetXmlDriver() {
        super(new XmlFriendlyNameCoder());
    }

    @Override
    protected XmlPullParser createParser() {
        return new MXParser();
    }

    @Override
    public HierarchicalStreamWriter createWriter(Writer out) {
        return new PrettyPrintWriter(out, "    ");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy