objectivehtml.ohtmlc
Class HtmlParser

java.lang.Object
  |
  +--objectivehtml.ohtmlc.HtmlParser

public class HtmlParser
extends java.lang.Object

This class parses a html file (xml compliant) and creates a HtmlForm object that represents the form in the html file.


Field Summary
static int NODE_IGNORED
          Message constant that indicates a Node was ignored in the parsing
static int PARENT_NODE
          Message constant that indicates the details of the parent Node are to be printed
 
Constructor Summary
HtmlParser()
           
 
Method Summary
static java.lang.String elementToString(org.w3c.dom.Element objElement)
          Returns a String representation of the given Element.
 java.util.Set getEntities()
          Gets the set of characters to be entitized
 boolean isTextCompressed()
          Gets the text compression setting, true for on, false otherwise
 HtmlForm parseHtml(java.lang.String sFileName, java.lang.String sFormID)
          Parses the form in the specified html file and creates a HtmlForm object that represents the form in the html file.
 void setEntities(java.util.Set stEntities)
          Sets the set of characters that need to be entitized.
 void setTextCompressed(boolean bIsOn)
          Sets the text compression to be either on or off.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE_IGNORED

public static final int NODE_IGNORED
Message constant that indicates a Node was ignored in the parsing

PARENT_NODE

public static final int PARENT_NODE
Message constant that indicates the details of the parent Node are to be printed
Constructor Detail

HtmlParser

public HtmlParser()
Method Detail

parseHtml

public HtmlForm parseHtml(java.lang.String sFileName,
                          java.lang.String sFormID)
                   throws javax.xml.parsers.FactoryConfigurationError,
                          javax.xml.parsers.ParserConfigurationException,
                          java.io.IOException,
                          org.xml.sax.SAXException,
                          OHtmlCParseException,
                          InvalidControlNameException
Parses the form in the specified html file and creates a HtmlForm object that represents the form in the html file. If sFormID is null, the first form found will be parsed.
Parameters:
sFileName - the file name
sFormID - the id of the form in the html file
Throws:
javax.xml.parsers.FactoryConfigurationError -  
javax.xml.parsers.ParserConfigurationException -  
java.io.IOException -  
org.xml.sax.SAXException - if the xml cannot be parsed
OHtmlCParseException - when a parse exception occurs
InvalidControlNameException - if an invalid control name is used

elementToString

public static final java.lang.String elementToString(org.w3c.dom.Element objElement)
Returns a String representation of the given Element.
Parameters:
objElement - the Element object
Returns:
a String represention of objElement

setTextCompressed

public void setTextCompressed(boolean bIsOn)
Sets the text compression to be either on or off.
Parameters:
bIsOn - true for on, false for off
See Also:
isTextCompressed()

isTextCompressed

public boolean isTextCompressed()
Gets the text compression setting, true for on, false otherwise
Returns:
the text compression setting
See Also:
setTextCompressed(boolean)

setEntities

public void setEntities(java.util.Set stEntities)
Sets the set of characters that need to be entitized.
Parameters:
stEntities - the characters to be entitized
See Also:
getEntities()

getEntities

public java.util.Set getEntities()
Gets the set of characters to be entitized
Returns:
the set of the characters to be entitized
See Also:
setEntities(Set)