|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.e2e.common.POParser
This class is used to parse XML that conforms to either the
E2E_PO or E2E_POAcknowledgement DTDs and to return a
object. This parser recognizes only the first
PO
LineItem
XML element, subsequent elements are
ignored. The line item behavior is such due to limitations in
the
class.
By default, validation is not
performed against the DTD. Set the system property
"samples.e2e.b2b.xml.validate" to true if validation is
desired during parsing. The validation system property
applies to the behavior of this class and also to PO
QuoteParser
.
PO
,
POImpl
,
POElement
,
QuoteParser
Field Summary | |
static java.lang.String |
VALIDATION_PROP
Setting the system property "samples.e2e.b2b.xml.validate" to true will cause instances of this class to validate. |
Constructor Summary | |
POParser(org.xml.sax.InputSource source)
Constructs an instance of the parser given a org.xml.sax.InputSource . |
Method Summary | |
void |
characters(char[] chars,
int start,
int length)
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
endDocument()
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
endPrefixMapping(java.lang.String prefix)
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
error(org.xml.sax.SAXParseException e)
Implementation of the org.xml.sax.ErrorHandler
interface. |
void |
fatalError(org.xml.sax.SAXParseException e)
Implementation of the org.xml.sax.ErrorHandler
interface. |
void |
ignorableWhitespace(char[] chars,
int start,
int length)
Implementation of the org.xml.sax.ContentHandler
interface. |
PO |
parse()
Parses the org.xml.sax.InputSource specified
in the constructor and returns a object to
the caller. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
skippedEntity(java.lang.String name)
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
startDocument()
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Implementation of the org.xml.sax.ContentHandler
interface. |
void |
warning(org.xml.sax.SAXParseException e)
Implementation of the org.xml.sax.ErrorHandler
interface. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String VALIDATION_PROP
Constructor Detail |
public POParser(org.xml.sax.InputSource source)
org.xml.sax.InputSource
.
source
- the XML source to parse.Method Detail |
public PO parse() throws ParsingException
org.xml.sax.InputSource
specified
in the constructor and returns a PO
object to
the caller. By default XML validation is NOT performed, set
the system property VALIDATION_PROP
.
PO
object constructed from the parsed
XML.public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void characters(char[] chars, int start, int length) throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void ignorableWhitespace(char[] chars, int start, int length) throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void setDocumentLocator(org.xml.sax.Locator locator)
org.xml.sax.ContentHandler
interface.
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void startDocument() throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void endDocument() throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
org.xml.sax.ContentHandler
interface.
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.ErrorHandler
interface.
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.ErrorHandler
interface.
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.ErrorHandler
interface.
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |