|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
oracle.ifs.beans.parsers.IfsXmlParser
An IfsXmlParser is an XML parser that acts as the entry point for all iFS XML parsing functionality.
The main function of the parser is to determine the nature of the XML document it is processing, then select the appropriate content-specific parser and submit the document for processing by that parser.
As such, the parser provides for the transparent processing of iFS-specific XML documents, meaning those XML documents that are used to create iFS objects and configure iFS, as well as non-iFS XML documents that are meant to be simply stored in iFS, with or without validation.
The parser uses a PropertyBundle called XmlParserLookup to find the appropriate parser, then instantiates it. If the parser determines the document to be an iFS-specific XML document, it instantiates the standard iFS parser. Otherwise, the parser looks for a custom parser and instantiates that instead. Finally, the parser will look for a parser that would simply create a literal iFS document from the XML document.
The parser can create a DOM tree from the XML document, if required. It uses
the Oracle DOM parser to create the DOM. The content-specific parsers
instantiated by the parser can get the DOM by calling createDOM
.
The parser object is passed to the content-specific parsers for this purpose.
The parser implements the Parser interface, while the content-specific parsers instantiated by the parser implement the XmlParserInterface.
Fields inherited from interface oracle.ifs.beans.parsers.Parser |
CURRENT_NAME_OPTION, CURRENT_PATH_OPTION, DOCUMENT_CHARSET_OPTION, DOCUMENT_LANGUAGE_OPTION, UPDATE_OBJECT_OPTION, VALIDATE_DOCUMENT_OPTION |
Constructor Summary | |
IfsXmlParser(LibrarySession ls)
Constucts an XmlParser |
Method Summary | |
oracle.xml.parser.v2.XMLDocument |
createDOM(java.io.InputStream stream,
boolean validate)
Creates the DOM object from an InputStream, using the Oracle DOM Parser. |
LibraryObject |
parse(java.io.InputStream stream,
ParserCallback callback,
java.util.Hashtable options)
Inherited from Parser |
Constructor Detail |
public IfsXmlParser(LibrarySession ls)
ls
- the LibrarySessionMethod Detail |
public final LibraryObject parse(java.io.InputStream stream, ParserCallback callback, java.util.Hashtable options) throws IfsException
parse
in interface Parser
oracle.ifs.beans.parsers.Parser
stream
- the InputStreamcallback
- an application object that interacts with the
the parsing process; optional, can be nulloptions
- any Parser-specific optionsIfsException
- (IFS-12601) if the operation failspublic oracle.xml.parser.v2.XMLDocument createDOM(java.io.InputStream stream, boolean validate) throws IfsException
stream
- the InputStream representing the XML documentvalidate
- boolean indicating whether the DOM parser should be
used in validating or non-validating modeIfsException
- thrown if the operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |