Interface IContentHandler
Receive notification of the logical content of a document.
Assembly: Lucene.Net.Benchmark.dll
Syntax
public interface IContentHandler
Remarks
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. Seehttp://www.saxproject.org for further information.
This is the main interface that most SAX applications implement: if the application needs to be informed of basic parsing events, it implements this interface and registers an instance with the SAX parser using the ContentHandler method.The parser uses the instance to report basic document-related events like the start and end of elements and character data.
The order of events in this interface is very important, and mirrors the order of information in the document itself.For example, all of an element's content (character data, processing instructions, and/or subelements) will appear, in order, between the startElement event and the corresponding endElement event.
This interface is similar to the now-deprecated SAX 1.0 DocumentHandler interface, but it adds support for Namespaces and for reporting skipped entities(in non-validating XML processors).
Methods
Name | Description |
---|---|
Characters(Char[], Int32, Int32) | Receive notification of character data. |
EndDocument() | Receive notification of the end of a document. |
EndElement(String, String, String) | Receive notification of the end of an element. |
EndPrefixMapping(String) | End the scope of a prefix-URI mapping. |
IgnorableWhitespace(Char[], Int32, Int32) | Receive notification of ignorable whitespace in element content. |
ProcessingInstruction(String, String) | Receive notification of a processing instruction. |
SetDocumentLocator(ILocator) | Receive an object for locating the origin of SAX document events. |
SkippedEntity(String) | Receive notification of a skipped entity. This is not called for entity references within markup constructs such as element start tags or markup declarations. (The XML recommendation requires reporting skipped external entities. SAX also reports internal entity expansion/non-expansion, except within markup constructs.) The Parser will invoke this method each time the entity is skipped.Non-validating processors may skip entities if they have not seen the declarations(because, for example, the entity was declared in an external DTD subset). All processors may skip external entities, depending on the values of the http://xml.org/sax/features/external-general-entities and the http://xml.org/sax/features/external-general-entities properties. |
StartDocument() | Receive notification of the beginning of a document. |
StartElement(String, String, String, IAttributes) | Receive notification of the beginning of an element. The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding EndElement(String, String, String) event for every StartElement(String, String, String, IAttributes) event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding EndElement(String, String, String) event. This event allows up to three name components for each element:
Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and thehttp://xml.org/sax/features/namespace-prefixes properties:
Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): IMPLIED attributes will be omitted. The attribute listwill contain attributes used for Namespace declarations (xmlns/// attributes) only if the http://xml.org/sax/features/namespace-prefixes property is true (it is false by default, and support for a true value is optional). Like Characters(Char[], Int32, Int32), attribute values may have
characters that need more than one |
StartPrefixMapping(String, String) | Begin the scope of a prefix-URI Namespace mapping. |