com.sapportals.wcm.util.html

Interface IHTMLContentHandler

All Known Implementing Classes:
HTMLFilterImpl, HTMLScriptRemover, HTMLStreamWriter

public interface IHTMLContentHandler

IHTMLContentHandler receives events from a IHTMLReader.

For each event the IHTMLReader calls the corresponding method in the content handler. This maps as follows: Document Part Event Notes (start of input) startDocument This event precedes any other event. (end of input) endDocument This is the last event for a document. <tag...>, <tag.../> startElement This event is generated for all tags which are not an end tag (e.g. start with '</'. Note that for empty tags (e.g. ending with '/>') startElement is the only event generated. There will never be an endElement event. </tag> endElement A tag starting with '</' will generate this event. otherwise characters The following parts of a HTML document will generate this event: characters between tags, DOCTYPE declarations, processing instructions, CDATA sections, any characters between start/end of script or pre tags.

Copyright (c) SAP AG 2001-2002


Method Summary
 void characters(char[] ch, int start, int length)
          Notification of a character event.
 void endDocument()
          Notification that the document is finished.
 void endElement(IHTMLElement element)
          Notification that an end tag was encountered (e.g. starting with '</').
 void startDocument()
          Notification that the document is about to start.
 void startElement(IHTMLElementStart element)
          Notification that a tag was encountered.
 

Method Detail

characters

void characters(char[] ch,
                int start,
                int length)
                throws HTMLException
Notification of a character event. The characters of the event are found in ch at offset start . There are length number of characters.

The content of the buffer before start or after start + length is undefined. Modification of the character array is strictly forbidden. The content of the array is undefined after this method returns.

Parameters:
ch - array holding characters of event
start - where in the array the characters begin
length - number of characters in event
Throws:
HTMLException - to indicate error in event handling

endDocument

void endDocument()
                 throws HTMLException
Notification that the document is finished.

Throws:
HTMLException - to indicate error in event handling

endElement

void endElement(IHTMLElement element)
                throws HTMLException
Notification that an end tag was encountered (e.g. starting with '</'). The element paramter is only valid for the duration of the call. The content of element are undefined when the method returns. See IHTMLElement for further information.

Parameters:
element - TBD: Description of the incoming method parameter
Throws:
HTMLException - to indicate error in event handling

startDocument

void startDocument()
                   throws HTMLException
Notification that the document is about to start.

Throws:
HTMLException - to indicate error in event handling

startElement

void startElement(IHTMLElementStart element)
                  throws HTMLException
Notification that a tag was encountered. The element paramter is only valid for the duration of the call. The content of element are undefined when the method returns. See IHTMLElementStart for further information.

Parameters:
element - TBD: Description of the incoming method parameter
Throws:
HTMLException - to indicate error in event handling
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice