public class XmlLoadParser
extends org.xml.sax.helpers.DefaultHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
XmlLoadParser.Builder
Builder factory for creating a parser.
|
| Modifier and Type | Method and Description |
|---|---|
static XmlLoadParser.Builder |
builder(DataBase dataBase,
java.io.File inFile)
Create a builder
|
void |
characters(char[] ch,
int start,
int length)
Called when character data is found in document
If we are recording add a text node to DOM tree
|
void |
endDocument()
Called when there are no more nodes in the current document.
|
void |
endElement(java.lang.String uri,
java.lang.String namespc,
java.lang.String name)
Called when the SAX parser reaches a new XML closing tag.
|
void |
fatalError(org.xml.sax.SAXParseException e) |
protected void |
processDOMTree(org.w3c.dom.Document doc)
Called when we have a new DOM tree
|
void |
startDocument()
Called before process begins on current document.
|
void |
startElement(java.lang.String uri,
java.lang.String namespc,
java.lang.String name,
org.xml.sax.Attributes attr)
Called when the SAX parser reaches a new XML tag.
|
@CheckReturnValue @Nonnull public static XmlLoadParser.Builder builder(@Nonnull DataBase dataBase, @Nonnull java.io.File inFile)
dataBase - the database.inFile - the file to process.public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException - a problempublic void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException - a problempublic void startElement(java.lang.String uri,
java.lang.String namespc,
java.lang.String name,
org.xml.sax.Attributes attr)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandleruri - URLnamespc - the name spacename - the nameattr - the attributeorg.xml.sax.SAXException - a problempublic void endElement(java.lang.String uri,
java.lang.String namespc,
java.lang.String name)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandleruri - the URInamespc - the name spacename - the nameorg.xml.sax.SAXException - a problempublic void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerch - the charactersstart - the startlength - the lengthorg.xml.sax.SAXException - a problempublic void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlere - the errororg.xml.sax.SAXException - a problemprotected void processDOMTree(@Nonnull
org.w3c.dom.Document doc)
throws java.lang.Exception
doc - the documentjava.lang.Exception - a serious problemstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.