com.izforge.izpack.adaptator.impl
Class XMLParser

java.lang.Object
  extended by com.izforge.izpack.adaptator.impl.XMLParser
All Implemented Interfaces:
IXMLParser

public class XMLParser
extends java.lang.Object
implements IXMLParser

Author:
Anthonin Bonnefoy, David Duponchel

Nested Class Summary
 class XMLParser.ByteBufferInputStream
           
 
Field Summary
private  LineNumberFilter filter
           
private  java.lang.String parsedItem
           
 
Constructor Summary
XMLParser()
           
 
Method Summary
 IXMLElement parse(java.io.InputStream inputStream)
          Parse the given stream to a XML
 IXMLElement parse(java.io.InputStream inputStream, java.lang.String systemId)
          Parse the given stream to a XML and set the systemId to the inputSource.
 IXMLElement parse(java.lang.String inputString)
          Parse the given text as an xml
 IXMLElement parse(java.net.URL inputURL)
          Parse the resource at the url specified
private  javax.xml.transform.dom.DOMResult parseLineNrFromInputSource(org.xml.sax.InputSource inputSource)
           
private  IXMLElement searchFirstElement(javax.xml.transform.dom.DOMResult domResult)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filter

private LineNumberFilter filter

parsedItem

private java.lang.String parsedItem
Constructor Detail

XMLParser

public XMLParser()
Method Detail

searchFirstElement

private IXMLElement searchFirstElement(javax.xml.transform.dom.DOMResult domResult)

parseLineNrFromInputSource

private javax.xml.transform.dom.DOMResult parseLineNrFromInputSource(org.xml.sax.InputSource inputSource)

parse

public IXMLElement parse(java.io.InputStream inputStream)
Description copied from interface: IXMLParser
Parse the given stream to a XML

Specified by:
parse in interface IXMLParser
Parameters:
inputStream - Stream to parse
Returns:
Root element of the parsed xml

parse

public IXMLElement parse(java.io.InputStream inputStream,
                         java.lang.String systemId)
Description copied from interface: IXMLParser
Parse the given stream to a XML and set the systemId to the inputSource. It is useful for the xinclude feature, as the path of the resolution depends on the systemId.

Specified by:
parse in interface IXMLParser
Parameters:
inputStream - Stran to parse
systemId - System id of the file parsed
Returns:
Root element of the parsed XML

parse

public IXMLElement parse(java.lang.String inputString)
Description copied from interface: IXMLParser
Parse the given text as an xml

Specified by:
parse in interface IXMLParser
Parameters:
inputString - Xml written in a string
Returns:
Root element of the parsed xml

parse

public IXMLElement parse(java.net.URL inputURL)
Description copied from interface: IXMLParser
Parse the resource at the url specified

Specified by:
parse in interface IXMLParser
Parameters:
inputURL - Url of the resource
Returns:
Root element of the parsed xml