com.japisoft.fastparser.document
Interface DocumentBuilder

All Known Implementing Classes:
DocumentBuilderImpl

public interface DocumentBuilder

Interface for building an XML document

Version:
1.0
Author:
(c) 2002-2003 JAPISOFT

Method Summary
 void addCommentNode(java.lang.String comment)
          Add a new node for the current node
 void addTextNode(java.lang.String text)
          Add a new text node for the current node
 void closeNode()
          Close the last open node
 void closeNode(java.lang.String prefix, java.lang.String tag)
          Close the current node, an exception is thrown for invalid tag name
 Document getDocument()
           
 void openNode(java.lang.String prefix, java.lang.String prefixURI, java.lang.String tag)
          Reset the current node
 void setAttribute(java.lang.String prefix, java.lang.String prefixURI, java.lang.String att, java.lang.String value)
          Reset attribute for the current node, an exception is thrown for no current node
 void setCheckForCloseTag(boolean check)
          Check the closing node : false should be used for always well formed document
 void setCurrentLine(int line)
          Set the current parsing line
 void setNameSpace(java.lang.String prefix, java.lang.String prefixURI)
          Set the namespace prefix and its URI
 void trimTextNode(boolean trim)
          Remove start and end white space for text
 

Method Detail

setCurrentLine

public void setCurrentLine(int line)
Set the current parsing line


setCheckForCloseTag

public void setCheckForCloseTag(boolean check)
Check the closing node : false should be used for always well formed document


openNode

public void openNode(java.lang.String prefix,
                     java.lang.String prefixURI,
                     java.lang.String tag)
              throws DocumentBuilderException
Reset the current node

DocumentBuilderException

closeNode

public void closeNode(java.lang.String prefix,
                      java.lang.String tag)
               throws DocumentBuilderException
Close the current node, an exception is thrown for invalid tag name

DocumentBuilderException

closeNode

public void closeNode()
               throws DocumentBuilderException
Close the last open node

DocumentBuilderException

setAttribute

public void setAttribute(java.lang.String prefix,
                         java.lang.String prefixURI,
                         java.lang.String att,
                         java.lang.String value)
                  throws DocumentBuilderException
Reset attribute for the current node, an exception is thrown for no current node

DocumentBuilderException

setNameSpace

public void setNameSpace(java.lang.String prefix,
                         java.lang.String prefixURI)
Set the namespace prefix and its URI


addCommentNode

public void addCommentNode(java.lang.String comment)
Add a new node for the current node


addTextNode

public void addTextNode(java.lang.String text)
                 throws DocumentBuilderException
Add a new text node for the current node

DocumentBuilderException

getDocument

public Document getDocument()
Returns:
current document

trimTextNode

public void trimTextNode(boolean trim)
Remove start and end white space for text