Package org.codehaus.jettison.mapped

Examples of org.codehaus.jettison.mapped.MappedXMLOutputFactory


        nstojns.put("http://book.acme.com", "acme");

        MappedXMLInputFactory xif = new MappedXMLInputFactory(nstojns);
        properties.put(XMLInputFactory.class.getName(), xif);

        MappedXMLOutputFactory xof = new MappedXMLOutputFactory(nstojns);
        properties.put(XMLOutputFactory.class.getName(), xof);

        sfJson.setProperties(properties);

        sfJson.create();
View Full Code Here


    private final MappedXMLOutputFactory mof;
    private final MappedXMLInputFactory mif;
   
    public JsonDataFormat() {
        final Map nstjsons = new HashMap();
        mof = new MappedXMLOutputFactory(nstjsons);
        mif = new MappedXMLInputFactory(nstjsons);
    }
View Full Code Here

        try {

            // Set up the JSON StAX implementation
            Map<String, String> nstojns = new HashMap<String, String>();
            XMLOutputFactory factory = new MappedXMLOutputFactory(nstojns);
            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);
            xsw.writeStartDocument();
            if (obj != null) {

                XmlObject xObj = obj;
                XMLBeanStreamSerializer ser = new XMLBeanStreamSerializer();
View Full Code Here

    private final MappedNamespaceConvention convention;

    public JettisonMappedXmlDriver() {
        final HashMap nstjsons = new HashMap();
        final Configuration config = new Configuration(nstjsons);
        mof = new MappedXMLOutputFactory(config);
        mif = new MappedXMLInputFactory(config);
        convention = new MappedNamespaceConvention(config);
    }
View Full Code Here

    public XStreamConverter() {
        this.classMapper = new DefaultClassMapper();
       
   Map nstjsons = new HashMap();
        this.outputFactory = new MappedXMLOutputFactory(nstjsons);
        this.inputFactory = new MappedXMLInputFactory(nstjsons);
        this.objectMapper = new XStream();
    }
View Full Code Here

            if (isBadgerFishConventionUsed) {
                xsw = new BadgerFishXMLStreamWriter(writer);
            } else {
                try {
                    xsw =
                        new MappedXMLOutputFactory(outputConfiguration)
                            .createXMLStreamWriter(writer);
                } catch (XMLStreamException e) {
                    if (logger.isErrorEnabled()) {
                        logger.error(Messages.getMessage("jaxbFailToMarshal", t.getName()), e); //$NON-NLS-1$
                    }
View Full Code Here

        nstojns.put("http://book.acme.com", "acme");

        MappedXMLInputFactory xif = new MappedXMLInputFactory(nstojns);
        properties.put(XMLInputFactory.class.getName(), xif);

        MappedXMLOutputFactory xof = new MappedXMLOutputFactory(nstojns);
        properties.put(XMLOutputFactory.class.getName(), xof);

        sfJson.setProperties(properties);

        sfJson.create();
View Full Code Here

        try {

            // Set up the JSON StAX implementation
            Map<String, String> nstojns = new HashMap<String, String>();
            XMLOutputFactory factory = new MappedXMLOutputFactory(nstojns);
            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);

            if (obj instanceof XmlObject) {

                XmlObject xObj = (XmlObject)obj;
                XMLBeanStreamSerializer ser = new XMLBeanStreamSerializer();
View Full Code Here

        try {

            // Set up the JSON StAX implementation
            Map<String, String> nstojns = new HashMap<String, String>();
            XMLOutputFactory factory = new MappedXMLOutputFactory(nstojns);
            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);

            if (obj instanceof XmlObject) {

                XmlObject xObj = (XmlObject)obj;
                XMLBeanStreamSerializer ser = new XMLBeanStreamSerializer();
View Full Code Here

            //marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);

            // Set up the JSON StAX implementation
            Map<String, String> nstojns = new HashMap<String, String>();
           
            XMLOutputFactory factory = new MappedXMLOutputFactory(nstojns);
            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);           
            marshaller.marshal(obj, xsw);
            xsw.close();
           
        } catch (JAXBException e) {
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.codehaus.jettison.mapped.MappedXMLOutputFactory

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.