Package javax.xml.stream

Examples of javax.xml.stream.XMLEventFactory


  }

  private void createNode(XMLEventWriter eventWriter, String name,
      String value) throws XMLStreamException {

    XMLEventFactory eventFactory = XMLEventFactory.newInstance();
   
    //XMLEvent end = eventFactory.createDTD("\n");
    //XMLEvent tab = eventFactory.createDTD("\t");
   
    // Create Start node
    StartElement sElement = eventFactory.createStartElement("", "", name);
    //eventWriter.add(tab);
    eventWriter.add(sElement);
    // Create Content
    Characters characters = eventFactory.createCharacters(value);
    eventWriter.add(characters);
    // Create End node
    EndElement eElement = eventFactory.createEndElement("", "", name);
    eventWriter.add(eElement);
    //eventWriter.add(end);

  }
View Full Code Here

TOP

Related Classes of javax.xml.stream.XMLEventFactory

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.