Package de.pdark.decentxml

Examples of de.pdark.decentxml.XMLIOSource


  private static GenericP2Artifact parseFeature(InputStream in)
      throws IOException
  {
    // no closing of input stream required - our caller will close the jar
    // at the end
    final Feature f = new Feature(new XMLParser().parse(new XMLIOSource(in)));
    return new GenericP2Artifact(f.getId(), f.getVersion(), P2ArtifactType.FEATURE);
  }
View Full Code Here


    }

    public static TargetDefinitionFile read(File file) throws IOException {
        FileInputStream input = new FileInputStream(file);
        try {
            return new TargetDefinitionFile(parser.parse(new XMLIOSource(input)));
        } catch (XMLParseException e) {
            throw new TargetDefinitionSyntaxException("Target definition is not well-formed XML: " + e.getMessage(), e);
        } finally {
            IOUtil.close(input);
        }
View Full Code Here

    protected Document createExemplarDoc() throws IOException {
        String exemplar = "exemplar/exemplar.xml";
        URL url = findResource(exemplar, null);
        if (url != null) {
            return parse(new XMLIOSource(url));
        } else {
            Activator.getLogger().warning("Could not find file " + exemplar + " on the class path.");
            Document d = new Document();
            d.addNode(new Element("beans", springNamespace));
            return d;
View Full Code Here

    }

    public XmlModel unmarshal(File file) throws Exception {
        Document doc;
        if (file.exists()) {
            doc = parse(new XMLIOSource(file));
/*
      // lets find the header stuff
      val root = doc.getRootElement
      if (root != null) {
        val name = root.getNodeName()
View Full Code Here

    protected Document createExemplarDoc() throws IOException {
        String exemplar = "io/fabric8/camel/tooling/exemplar.xml";
        URL url = findResource(exemplar, null);
        if (url != null) {
            return parse(new XMLIOSource(url));
        } else {
            LOG.warn("Could not find file {} on the class path", exemplar);
            Document d = new Document();
            d.addNode(new Element("beans", springNamespace));
            return d;
View Full Code Here

    }

    public XmlModel unmarshal(File file) throws Exception {
        Document doc;
        if (file.exists()) {
            doc = parse(new XMLIOSource(file));
/*
      // lets find the header stuff
      val root = doc.getRootElement
      if (root != null) {
        val name = root.getNodeName()
View Full Code Here

TOP

Related Classes of de.pdark.decentxml.XMLIOSource

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.