public PvXMLWriter(){
  try {
    factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance();
    handler=factory.newTransformerHandler();
    serializer=handler.getTransformer();
    serializer.setOutputProperty(OutputKeys.ENCODING,"UTF-8");
    serializer.setOutputProperty(OutputKeys.INDENT,"yes");
    serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount","2");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

public PvXMLWriter ( ) { try { factory = ( SAXTransformerFactory ) SAXTransformerFactory . newInstance ( ) ; handler = factory . newTransformerHandler ( ) ; serializer = handler . getTransformer ( ) ; serializer . setOutputProperty ( OutputKeys . ENCODING , "UTF-8" ) ; serializer . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; serializer . setOutputProperty ( "{http://xml.apache.org/xslt}indent-amount" , "2" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }
creates a new instance of pvxmlwriter
