Xerces-C++ 3.3.0
|
#include <xercesc/dom/DOMLSParserFilter.hpp>
Public Types | |
Public Contants | |
enum | FilterAction { FILTER_ACCEPT = 1 , FILTER_REJECT = 2 , FILTER_SKIP = 3 , FILTER_INTERRUPT = 4 } |
Constants returned by acceptNode. More... | |
Public Member Functions | |
Destructor | |
virtual | ~DOMLSParserFilter () |
Destructor. | |
Functions introduced in DOM Level 3 | |
virtual FilterAction | acceptNode (DOMNode *node)=0 |
This method will be called by the parser at the completion of the parsing of each node. | |
virtual FilterAction | startElement (DOMElement *node)=0 |
The parser will call this method after each DOMElement start tag has been scanned, but before the remainder of the DOMElement is processed. | |
virtual DOMNodeFilter::ShowType | getWhatToShow () const =0 |
Tells the DOMLSParser what types of nodes to show to the method DOMLSParserFilter::acceptNode . | |
Protected Member Functions | |
Hidden constructors | |
DOMLSParserFilter () | |
Constants returned by acceptNode.
FILTER_ACCEPT:
Accept the node.
FILTER_REJECT:
Reject the node and its children.
FILTER_SKIP:
Skip this single node. The children of this node will still be considered.
FILTER_INTERRUPT:
Interrupt the normal processing of the document.
Enumerator | |
---|---|
FILTER_ACCEPT | |
FILTER_REJECT | |
FILTER_SKIP | |
FILTER_INTERRUPT |
|
protected |
|
virtual |
Destructor.
|
pure virtual |
This method will be called by the parser at the completion of the parsing of each node.
The node and all of its descendants will exist and be complete. The parent node will also exist, although it may be incomplete, i.e. it may have additional children that have not yet been parsed. Attribute nodes are never passed to this function. From within this method, the new node may be freely modified - children may be added or removed, text nodes modified, etc. The state of the rest of the document outside this node is not defined, and the affect of any attempt to navigate to, or to modify any other part of the document is undefined. For validating parsers, the checks are made on the original document, before any modification by the filter. No validity checks are made on any document modifications made by the filter. If this new node is rejected, the parser might reuse the new node and any of its descendants.
node | The newly constructed element. At the time this method is called, the element is complete - it has all of its children (and their children, recursively) and attributes, and is attached as a child to its parent. |
|
pure virtual |
Tells the DOMLSParser
what types of nodes to show to the method DOMLSParserFilter::acceptNode
.
If a node is not shown to the filter using this attribute, it is automatically included in the DOM document being built. See DOMNodeFilter
for definition of the constants. The constants SHOW_ATTRIBUTE, SHOW_DOCUMENT, SHOW_DOCUMENT_TYPE, SHOW_NOTATION, SHOW_ENTITY, and SHOW_DOCUMENT_FRAGMENT are meaningless here. Those nodes will never be passed to DOMLSParserFilter::acceptNode.
|
pure virtual |
The parser will call this method after each DOMElement
start tag has been scanned, but before the remainder of the DOMElement
is processed.
The intent is to allow the element, including any children, to be efficiently skipped. Note that only element nodes are passed to the startElement function. The element node passed to startElement for filtering will include all of the attributes, but none of the children nodes. The DOMElement
may not yet be in place in the document being constructed (it may not have a parent node.) A startElement filter function may access or change the attributes for the DOMElement
. Changing namespace declarations will have no effect on namespace resolution by the parser.
node | The newly encountered element. At the time this method is called, the element is incomplete - it will have its attributes, but no children. |