DimDom v0.8.2

org.alltimeflashdreamer.dimdom
Class XHTMLParser

java.lang.Object
  |
  +--org.alltimeflashdreamer.dimdom.XHTMLParser

public class XHTMLParser
extends Object

Title: XHTMLParser
Description: Parses a File or an InputStream source and returns the Document instance. The parser is the one of Enhydra's XMLC engine. Note: This is a validating parser, therefore each input source needs a valid XHTML doctype tag and must be fully XHTML compliant, which means that each tag must have an ending tag and each attribute needs a value that is written between "" or ''.
Examples:


Constructor Summary
XHTMLParser()
          Empty constructor.
 
Method Summary
 Document parse(File file)
          Parses the file and returns a Document object containing the DOM of the file.
 Document parse(InputStream stream)
          Parses the input stream and returns a Document object containing the DOM of the stream.
The parsing itself is done with the validating Xerces XHTML parser.
 Document parse(String sXHTML)
          Parses the input string and returns a Document object containing the DOM of the content.
The parsing itself is done with the validating Xerces XHTML parser.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHTMLParser

public XHTMLParser()
Empty constructor.
Method Detail

parse

public Document parse(File file)
               throws IOException,
                      SAXException
Parses the file and returns a Document object containing the DOM of the file.
The parsing itself is done with the validating Xerces XHTML parser.
Parameters:
file - the file to parse
Returns:
an org.w3c.dom.Document implementing object instance
Throws:
IOException - thrown by the DOMParser's parse method
SAXException - thrown by the DOMParser's parse method

parse

public Document parse(InputStream stream)
               throws IOException,
                      SAXException
Parses the input stream and returns a Document object containing the DOM of the stream.
The parsing itself is done with the validating Xerces XHTML parser.
Parameters:
stream - the InputStream to parse from
Returns:
an org.w3c.dom.Document implementing object instance
Throws:
IOException - thrown by the DOMParser's parse method
SAXException - thrown by the DOMParser's parse method

parse

public Document parse(String sXHTML)
               throws IOException,
                      SAXException
Parses the input string and returns a Document object containing the DOM of the content.
The parsing itself is done with the validating Xerces XHTML parser.
Parameters:
sXHTML - the validatable XHTML String to parse
Returns:
an org.w3c.dom.Document implementing object instance
Throws:
IOException - thrown by the DOMParser's parse method
SAXException - thrown by the DOMParser's parse method

Copyright (c) 2001/02 by Florian Steinsiepe