com.smallx.xml.infoset
Interface ItemConstructor


public interface ItemConstructor


Method Summary
 Child createCharacters(char[] value, int start, int len)
          Creates a parentless data child item.
 Child createCharacters(java.lang.String value)
          Creates a parentless data child item.
 Child createComment(char[] value, int start, int len)
           
 Child createComment(java.lang.String value)
           
 Document createDocument()
          Creates a document without a document element or base URI.
 Document createDocument(java.net.URI base)
          Creates a document without a document element with the specified base URI.
 DocumentEnd createDocumentEnd()
          Creates a document end event.
 Element createElement(Name name)
          Creates a parentless element.
 ElementEnd createElementEnd(Element startElement)
          Creates an element end event.
 ElementEnd createElementEnd(Name name)
          Creates an element end event.
 Child createProcessingInstruction(Name name, char[] value, int start, int len)
           
 Child createProcessingInstruction(Name name, java.lang.String value)
           
 Infoset getInfoset()
           
 

Method Detail

getInfoset

public Infoset getInfoset()

createElement

public Element createElement(Name name)
                      throws XMLException
Creates a parentless element.

Parameters:
name - The name of the element to create.
Returns:
An element instance.
Throws:
XMLException

createElementEnd

public ElementEnd createElementEnd(Name name)
                            throws XMLException
Creates an element end event.

Parameters:
name - The name of end element.
Throws:
XMLException

createElementEnd

public ElementEnd createElementEnd(Element startElement)
                            throws XMLException
Creates an element end event.

Parameters:
startElement - The element with the same name as the name of end element.
Throws:
XMLException

createDocument

public Document createDocument(java.net.URI base)
                        throws XMLException
Creates a document without a document element with the specified base URI.

Parameters:
base - The base URI (e.g. location) of the document to create.
Returns:
A document instance.
Throws:
XMLException

createDocument

public Document createDocument()
                        throws XMLException
Creates a document without a document element or base URI.

Returns:
A document instance.
Throws:
XMLException

createDocumentEnd

public DocumentEnd createDocumentEnd()
                              throws XMLException
Creates a document end event.

Throws:
XMLException

createCharacters

public Child createCharacters(java.lang.String value)
                       throws XMLException
Creates a parentless data child item.

Parameters:
value - The value for the data item.
Returns:
A Child that is also a Data item.
Throws:
XMLException

createCharacters

public Child createCharacters(char[] value,
                              int start,
                              int len)
                       throws XMLException
Creates a parentless data child item.

Parameters:
value - The value for the data item.
Returns:
A Child that is also a Data item.
Throws:
XMLException

createProcessingInstruction

public Child createProcessingInstruction(Name name,
                                         java.lang.String value)
                                  throws XMLException
Throws:
XMLException

createProcessingInstruction

public Child createProcessingInstruction(Name name,
                                         char[] value,
                                         int start,
                                         int len)
                                  throws XMLException
Throws:
XMLException

createComment

public Child createComment(java.lang.String value)
                    throws XMLException
Throws:
XMLException

createComment

public Child createComment(char[] value,
                           int start,
                           int len)
                    throws XMLException
Throws:
XMLException