|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.parser.ParserImpl
com.ibm.di.parser.XMLParser
public class XMLParser
A class reading and writing Entries in XML format.
Field Summary | |
---|---|
NodeList |
children
The children of the document element of the input Document |
int |
curindex
Variable containing the current index |
DocumentBuilder |
db
The document builder used to build the document |
String |
entrytag
The value of the "xmlEntryTag" attribute |
Document |
inputDoc
If we are reading a document, inputDoc will be available
as the XML DOM object in JavaScript |
Document |
outputDoc
If we are writing a document, outputDoc will be available as the XML DOM object in JavaScript |
Element |
toplevel
The root element |
Element |
toplevelInput
The document element of the input Document |
boolean |
useCData
Whether using CDATASection or TextNode. |
String |
valuetag
The value of the "xmlValueTag" attribute |
Fields inherited from class com.ibm.di.parser.ParserImpl |
---|
_debug, myConfiguration |
Constructor Summary | |
---|---|
XMLParser()
Constructor |
Method Summary | |
---|---|
void |
closeParser()
Close the parser |
void |
error(SAXParseException exception)
Rethrows the given exception |
void |
fatalError(SAXParseException exception)
Ignore this since an error is called immediately afterwards |
void |
flush()
Flush any data to the output |
boolean |
getOmitXMLDeclaration()
Returns whether we omit XML declaration or not. |
String |
getVersion()
Version information. |
void |
initInput()
Initializes the properties from the input Document |
void |
initOutput()
Initializes the output Document |
void |
initParser()
This function is called by the connector containing this parser |
Entry |
readEntry()
Constructs the next entry from the data structure read in initially. |
void |
registerScriptBeans(ScriptEngine se)
Registers inputDoc or outputDoc as the XML DOM object in JavaScript |
void |
setOmitXMLDeclaration(boolean omit)
Sets whether to omit XML declaration or not. |
void |
warning(SAXParseException err)
Logs the given warning |
void |
writeEntry(Entry entry)
Constructs the data structure from the next entry read in initially. |
Methods inherited from class com.ibm.di.parser.ParserImpl |
---|
debug, debugMode, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, querySchema, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Document inputDoc
inputDoc
will be available
as the XML DOM object in JavaScript
public Document outputDoc
public Element toplevel
public Element toplevelInput
public NodeList children
public int curindex
public boolean useCData
public String entrytag
public String valuetag
public DocumentBuilder db
Constructor Detail |
---|
public XMLParser()
Method Detail |
---|
public void registerScriptBeans(ScriptEngine se) throws Exception
registerScriptBeans
in interface ParserInterface
registerScriptBeans
in class ParserImpl
se
- ScriptEngine
Exception
- if an error occurs.public void initParser() throws Exception
initParser
in interface ParserInterface
initParser
in class ParserImpl
Exception
- if an error occurs.public void closeParser() throws Exception
closeParser
in interface ParserInterface
closeParser
in class ParserImpl
Exception
- if an error occurs.public void flush() throws Exception
flush
in interface ParserInterface
flush
in class ParserImpl
Exception
- if an error occurs.public void initOutput() throws Exception
Exception
- If could not find output stream.public void initInput() throws Exception
Exception
- if no input stream is found.public Entry readEntry() throws Exception
readEntry
in interface ParserInterface
Exception
- if an error occurs.public void writeEntry(Entry entry) throws Exception
writeEntry
in interface ParserInterface
entry
- the next Entry
Exception
- if an error occurs.public void setOmitXMLDeclaration(boolean omit)
omit
- if true
omits XML declaration header in output
stream; otherwise does not omit XML declaration;public boolean getOmitXMLDeclaration()
true
if omits XML declaration header in output
stream; false
otherwise.public void fatalError(SAXParseException exception)
fatalError
in interface ErrorHandler
exception
- SAXParseException
public void error(SAXParseException exception) throws SAXException
error
in interface ErrorHandler
exception
- SAXParseException
SAXException
public void warning(SAXParseException err) throws SAXException
warning
in interface ErrorHandler
err
- SAXParseException
SAXException
public String getVersion()
getVersion
in interface VersionInfoInterface
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |