Package org.jdom.input

Examples of org.jdom.input.SAXBuilder.build()


    xmlPaths = (xmlPaths.endsWith("/") || xmlPaths.endsWith("\\") ? xmlPaths.concat(include) : xmlPaths.concat("/").concat(include));   

    try {

      SAXBuilder builder = new SAXBuilder();
      Document doc = builder.build( new File( xmlPaths ) );
      Element root = doc.getRootElement();       
      Element config = root.getChild("configuration", root.getNamespace());
      Element params = config.getChild("params", config.getNamespace());
      if(params == null)
        return;
View Full Code Here


        String encoding = "ISO-8859-1";
    SAXBuilder builder = new org.jdom.input.SAXBuilder();
    String xml = "<?xml version=\"1.0\" encoding=\""+ encoding + "\"?> ";
    xml +=  "<" + rootElement.element_name + " " + rootElement.attribute + "></" + rootElement.element_name+">";
    spooler_log.debug3(xml);
    Document parentDoc = builder.build(new java.io.StringReader(xml));
    Element root = parentDoc.getRootElement();
  
     it=listOfElements.iterator();
        element = (JobSchedulerMetadataElement)it.next();
View Full Code Here

   private void getXml() {
 
      try {
        // ---- Read XML file ----
        SAXBuilder builder = new SAXBuilder();
        doc = builder.build( xmlFile );
      
        XMLOutputter fmt = new XMLOutputter();
        fmt.setFormat( Format.getPrettyFormat() )// only for nicer formatting
        // fmt.output( doc, System.out );
      } catch( Exception ex ) {
View Full Code Here

     
      try {
        //String schema = _properties.getProperty("editor.xml.xsd");
        SAXBuilder builder = new SAXBuilder(false);
       
      Document doc = builder.build(System.class.getResource(Options.getSchema()).toString());
     
      XPath x = XPath.newInstance("//xsd:documentation");         
      List<Element> listOfElement = x.selectNodes(doc);
      if(!listOfElement.isEmpty()) {
        Element e = listOfElement.get(0);
View Full Code Here

      SAXBuilder builder = new SAXBuilder();
      filename = _dom.getFilename();
      if(filename == null || filename.length() == 0)
        return list;

      Document doc = builder.build( new File( filename ) );

      root = doc.getRootElement();

      Element application = root.getChild("job_chain");
      if(application == null) {
View Full Code Here

    try {
      SAXBuilder builder = new SAXBuilder();

      String xml = createConfigurationFile();

      parentDoc = builder.build(new StringReader(xml));

      root = parentDoc.getRootElement();
      if (root != null) {
        config = root.getChild("config");
      }
View Full Code Here

      Iterator orderIterator = filelist.iterator();
      while (orderIterator.hasNext()) {
        try {
          jobXMLFilename = orderIterator.next().toString();
          File jobXMLFile = new File(jobXMLFilename);
          currDocument = builder.build(jobXMLFile);

          Element xmlRoot = currDocument.getRootElement();
          if (xmlRoot != null) {
            if (parent == null) {
              // config hat keinen Kindknoten {name}, also
View Full Code Here

          java.util.regex.Pattern.CASE_INSENSITIVE);
      Iterator orderIterator = filelist.iterator();
      while (orderIterator.hasNext()) {
        String xmlFilename = orderIterator.next().toString();
        File xmlFile = new File(xmlFilename);
        currDocument = builder.build(xmlFile);
        Element xmlRoot = currDocument.getRootElement();
        if (xmlRoot != null) {
          if (parent == null) {
            // config hat keinen Kindknoten {name}, also erzeugen
            parent = new Element(name);
View Full Code Here

    filename = filename + "~";

    try {
      // system.out.println("********************************************************************");
      SAXBuilder builder2 = getBuilder(false);
      Document doc = builder2.build(new StringReader(xml));
      // test
      SchedulerDom dom = new SchedulerDom(SchedulerDom.DIRECTORY);
      // dom.setInit(true);

      new File(originalFilename).delete();
View Full Code Here

    try {
      SAXBuilder builder = new SAXBuilder();

      // String xml = createConfigurationFile();

      Document doc = builder.build(new File(filename));

      Element root = doc.getRootElement();

      jobname = Utils.getAttributeValue("name", root);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.