Ejemplo n.º 1
0
  private void InitialBuilder() {
    //		root_id = 990000;
    tempFilepath = RawInput.getTemporaryFilePath("KnowtatorXmlBuilder", "xml");

    try {
      fos = new FileOutputStream(tempFilepath);
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    }
    OutputFormat of = new OutputFormat("XML", "UTF-8", true);
    of.setIndent(1);
    of.setIndenting(true);

    serializer = new XMLSerializer(fos, of);

    try {
      hd = serializer.asContentHandler();
    } catch (IOException e) {
      e.printStackTrace();
    }
    try {
      hd.startDocument();
    } catch (SAXException e) {
      e.printStackTrace();
    }
  }