All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.xmlutils.FragmentBuilder

java.lang.Object
   |
   +----org.xmlmiddleware.xmlutils.FragmentBuilder

public class FragmentBuilder
extends Object
implements ContentHandler
Creates a DocumentFragment from a string whose value is well-formed XML.

The root element of the XML is ignored; its children become the children of the DocumentFragment.

Version:
2.0
Author:
Ronald Bourret

Constructor Index

 o FragmentBuilder(XMLReader)
Construct a new FragmentBuilder.

Method Index

 o characters(char[], int, int)
For internal use only.
 o endDocument()
For internal use only.
 o endElement(String, String, String)
For internal use only.
 o endPrefixMapping(String)
For internal use only.
 o ignorableWhitespace(char[], int, int)
For internal use only.
 o parse(Document, String)
Construct a new document fragment.
 o processingInstruction(String, String)
For internal use only.
 o setDocumentLocator(Locator)
For internal use only.
 o skippedEntity(String)
For internal use only.
 o startDocument()
For internal use only.
 o startElement(String, String, String, Attributes)
For internal use only.
 o startPrefixMapping(String, String)
For internal use only.

Constructors

 o FragmentBuilder
 public FragmentBuilder(XMLReader xmlReader) throws SAXException
Construct a new FragmentBuilder.

Parameters:
xmlReader - An XMLReader. This must be non-validating.

Methods

 o parse
 public DocumentFragment parse(Document doc,
                               String xml) throws SAXException, IOException
Construct a new document fragment.

Parameters:
doc - The document to which the fragment will belong.
xml - The XML string to parse. Must be well-formed.
Returns:
The DocumentFragment
 o startDocument
 public void startDocument() throws SAXException
For internal use only.

 o endDocument
 public void endDocument() throws SAXException
For internal use only.

 o startElement
 public void startElement(String uri,
                          String localName,
                          String qName,
                          Attributes attrs) throws SAXException
For internal use only.

 o endElement
 public void endElement(String uri,
                        String localName,
                        String qName) throws SAXException
For internal use only.

 o characters
 public void characters(char ch[],
                        int start,
                        int length) throws SAXException
For internal use only.

 o ignorableWhitespace
 public void ignorableWhitespace(char ch[],
                                 int start,
                                 int length) throws SAXException
For internal use only.

 o processingInstruction
 public void processingInstruction(String target,
                                   String data) throws SAXException
For internal use only.

 o startPrefixMapping
 public void startPrefixMapping(String prefix,
                                String uri) throws SAXException
For internal use only.

 o endPrefixMapping
 public void endPrefixMapping(String prefix) throws SAXException
For internal use only.

 o setDocumentLocator
 public void setDocumentLocator(Locator locator)
For internal use only.

 o skippedEntity
 public void skippedEntity(String name) throws SAXException
For internal use only.


All Packages  Class Hierarchy  This Package  Previous  Next  Index