Java XMLStreamReader buildXmlStreamReader(String xml)

Here you can find the source of buildXmlStreamReader(String xml)

Description

build Xml Stream Reader

License

Open Source License

Declaration

public static XMLStreamReader buildXmlStreamReader(String xml) throws XMLStreamException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.StringReader;

import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;

public class Main {
    public static XMLStreamReader buildXmlStreamReader(String xml) throws XMLStreamException {
        XMLInputFactory factory = XMLInputFactory.newInstance();
        return factory.createXMLStreamReader(new StringReader(xml));
    }/*w w w .  ja v  a 2  s. c o  m*/
}

Related

  1. close(XMLStreamReader r)
  2. close(XMLStreamReader reader)
  3. close(XMLStreamReader reader)
  4. createFilteredReader(XMLStreamReader reader, StreamFilter filter)