net.praqma.util.xml
Class XML

java.lang.Object
  extended by net.praqma.util.xml.XML
Direct Known Subclasses:
Pom

public class XML
extends Object


Field Summary
protected  PraqmaLogger.Logger logger
           
 
Constructor Summary
XML(File xmlfile)
           
XML(InputStream is)
           
XML(String roottag)
           
 
Method Summary
 Element addElement(Element root, String tag)
           
 Element addElement(String tag)
           
 List<Element> getElements()
           
 List<Element> getElements(Element e)
           
 List<Element> getElements(Element e, String tag)
           
 List<Element> getElementsWithAttribute(Element e, String attr, String name)
           
 Element getFirstElement(Element e, String tag)
           
 Element getFirstElement(String tag)
           
 Element getRoot()
           
 String getXML()
           
 Source getXMLAsSource()
           
 void saveState(File filename)
           
 String transform(File xml, String xsl, File output)
           
 String transform(Source xmlSource, StreamSource xsltSource, File output)
           
 String transform(String xsl, File output)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected PraqmaLogger.Logger logger
Constructor Detail

XML

public XML(String roottag)

XML

public XML(File xmlfile)
    throws IOException
Throws:
IOException

XML

public XML(InputStream is)
Method Detail

addElement

public Element addElement(String tag)

addElement

public Element addElement(Element root,
                          String tag)

getRoot

public Element getRoot()

getFirstElement

public Element getFirstElement(String tag)
                        throws DOMException
Throws:
DOMException

getFirstElement

public Element getFirstElement(Element e,
                               String tag)
                        throws DOMException
Throws:
DOMException

getElements

public List<Element> getElements()

getElements

public List<Element> getElements(Element e)

getElements

public List<Element> getElements(Element e,
                                 String tag)

getElementsWithAttribute

public List<Element> getElementsWithAttribute(Element e,
                                              String attr,
                                              String name)

getXML

public String getXML()

getXMLAsSource

public Source getXMLAsSource()

transform

public String transform(File xml,
                        String xsl,
                        File output)

transform

public String transform(String xsl,
                        File output)

transform

public String transform(Source xmlSource,
                        StreamSource xsltSource,
                        File output)

saveState

public void saveState(File filename)


Copyright © 2011. All Rights Reserved.