
org.tp23.xgen.XGenFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of generation-x Show documentation
Show all versions of generation-x Show documentation
Utility for generating XML using XPath like statements
/*
* Copyright teknopaul 2014 LGPL
*/
package org.tp23.xgen;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
* Factory exists to make the API like the core XML APIs.
* You can just call new XGen();
*
* @author teknopaul
*
*/
public class XGenFactory {
public static XGen newInstance() {
return new XGen(FactoryUtils.newDocument());
}
public static XGen newInstance(DocumentBuilder db) {
return new XGen(db.newDocument());
}
public static XGen newInstance(Document document) {
return new XGen(document);
}
public static XGen newInstance(Element elem) {
return new XGen(elem.getOwnerDocument());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy