Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIParser Class Reference

This class defines the iparser interface. More...

#include <nsIParser.h>

Inheritance diagram for nsIParser:
Inheritance graph
[legend]
Collaboration diagram for nsIParser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_IMETHOD RegisterDTD (nsIDTD *aDTD)=0
 Call this method if you have a DTD that you want to share with the parser.
 NS_IMETHOD_ (void) SetContentSink(nsIContentSink *aSink)=0
 Select given content sink into parser for parser output gess5/11/98.
 NS_IMETHOD_ (nsIContentSink *) GetContentSink(void)=0
 retrieve the sink set into the parser gess5/11/98
 NS_IMETHOD_ (void) GetCommand(nsCString &aCommand)=0
 Call this method once you've created a parser, and want to instruct it about the command which caused the parser to be constructed.
 NS_IMETHOD_ (void) SetCommand(const char *aCommand)=0
 NS_IMETHOD_ (void) SetCommand(eParserCommands aParserCommand)=0
 NS_IMETHOD_ (void) SetDocumentCharset(const nsACString &aCharset
 Call this method once you've created a parser, and want to instruct it about what charset to load.
 NS_IMETHOD_ (void) GetDocumentCharset(nsACString &oCharset
 NS_IMETHOD_ (void) SetParserFilter(nsIParserFilter *aFilter)=0
NS_IMETHOD GetChannel (nsIChannel **aChannel)=0
 Get the channel associated with this parser harishd,gagan 07/17/01.
NS_IMETHOD GetDTD (nsIDTD **aDTD)=0
 Get the DTD associated with this parser vidur 9/29/99.
NS_IMETHOD ContinueParsing ()=0
NS_IMETHOD ContinueInterruptedParsing ()=0
 NS_IMETHOD_ (void) BlockParser()=0
 NS_IMETHOD_ (void) UnblockParser()=0
 NS_IMETHOD_ (PRBool) IsParserEnabled()=0
 NS_IMETHOD_ (PRBool) IsComplete()=0
NS_IMETHOD Parse (nsIURI *aURL, nsIRequestObserver *aListener=nsnull, PRBool aEnableVerify=PR_FALSE, void *aKey=0, nsDTDMode aMode=eDTDMode_autodetect)=0
NS_IMETHOD Parse (nsIInputStream *aStream, const nsACString &aMimeType, PRBool aEnableVerify=PR_FALSE, void *aKey=0, nsDTDMode aMode=eDTDMode_autodetect)=0
NS_IMETHOD Parse (const nsAString &aSourceBuffer, void *aKey, const nsACString &aMimeType, PRBool aEnableVerify, PRBool aLastCall, nsDTDMode aMode=eDTDMode_autodetect)=0
NS_IMETHOD Terminate (void)=0
NS_IMETHOD ParseFragment (const nsAString &aSourceBuffer, void *aKey, nsVoidArray &aTagStack, PRBool aXMLMode, const nsACString &aContentType, nsDTDMode aMode=eDTDMode_autodetect)=0
 This method gets called when you want to parse a fragment of HTML or XML surrounded by the context |aTagStack|.
NS_IMETHOD BuildModel (void)=0
 This method gets called when the tokens have been consumed, and it's time to build the model via the content sink.
 NS_IMETHOD_ (nsDTDMode) GetParseMode(void)=0
 Retrieve the parse mode from the parser...
NS_IMETHOD CancelParsingEvents ()=0
 Call this method to cancel any pending parsing events.

Public Attributes

PRInt32 aSource = 0
PRInt32oSource = 0

Detailed Description

This class defines the iparser interface.

This XPCOM inteface is all that parser clients ever need to see.

gess 3/25/98

Definition at line 140 of file nsIParser.h.


Member Function Documentation

NS_IMETHOD nsIParser::BuildModel ( void  ) [pure virtual]

This method gets called when the tokens have been consumed, and it's time to build the model via the content sink.

gess5/11/98

Returns:
error code -- 0 if model building went well .

Implemented in nsParser.

Call this method to cancel any pending parsing events.

Parsing events may be pending if all of the document's content has been passed to the parser but the parser has been interrupted because processing the tokens took too long.

kmcclusk 05/18/01

Returns:
NS_OK if succeeded else ERROR.

Implemented in nsParser.

Implemented in nsParser.

Implemented in nsParser.

NS_IMETHOD nsIParser::GetChannel ( nsIChannel **  aChannel) [pure virtual]

Get the channel associated with this parser harishd,gagan 07/17/01.

Parameters:
aChannelout param that will contain the result
Returns:
NS_OK if successful

Implemented in nsParser.

Here is the caller graph for this function:

NS_IMETHOD nsIParser::GetDTD ( nsIDTD **  aDTD) [pure virtual]

Get the DTD associated with this parser vidur 9/29/99.

Parameters:
aDTDout param that will contain the result
Returns:
NS_OK if successful, NS_ERROR_FAILURE for runtime error

Implemented in nsParser.

Here is the caller graph for this function:

nsIParser::NS_IMETHOD_ ( void  ) [pure virtual]

Select given content sink into parser for parser output gess5/11/98.

Parameters:
aSinkis the new sink to be used by parser
Returns:

Implemented in nsParser, nsParser, nsParser, nsParser, nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( nsIContentSink ) [pure virtual]

retrieve the sink set into the parser gess5/11/98

Returns:
current sink

Implemented in nsParser.

nsIParser::NS_IMETHOD_ ( void  ) [pure virtual]

Call this method once you've created a parser, and want to instruct it about the command which caused the parser to be constructed.

For example, this allows us to select a DTD which can do, say, view-source.

gess 3/25/98

Parameters:
aCommand-- ptrs to string that contains command
Returns:
nada

Implemented in nsParser, nsParser, nsParser, nsParser, nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( void  ) const [pure virtual]

Implemented in nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( void  ) [pure virtual]

Implemented in nsParser, nsParser, nsParser, nsParser, nsParser, and nsParser.

Call this method once you've created a parser, and want to instruct it about what charset to load.

ftang 4/23/99

Parameters:
aCharset-the charest of a document
aCharsetSource-the soure of the chares
Returns:
nada

Reimplemented in nsParser, and nsParser.

Reimplemented in nsParser, nsParser, nsParser, nsParser, nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( void  ) [pure virtual]

Implemented in nsParser, nsParser, nsParser, nsParser, nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( void  ) [pure virtual]

Implemented in nsParser, nsParser, nsParser, nsParser, nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( void  ) [pure virtual]

Implemented in nsParser, nsParser, nsParser, nsParser, nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( PRBool  ) [pure virtual]

Implemented in nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( PRBool  ) [pure virtual]

Implemented in nsParser, and nsParser.

nsIParser::NS_IMETHOD_ ( nsDTDMode  ) [pure virtual]

Retrieve the parse mode from the parser...

gess 6/9/98

Returns:
ptr to scanner

Implemented in nsParser.

NS_IMETHOD nsIParser::Parse ( nsIURI aURL,
nsIRequestObserver aListener = nsnull,
PRBool  aEnableVerify = PR_FALSE,
void aKey = 0,
nsDTDMode  aMode = eDTDMode_autodetect 
) [pure virtual]

Implemented in nsParser.

Here is the caller graph for this function:

NS_IMETHOD nsIParser::Parse ( nsIInputStream aStream,
const nsACString &  aMimeType,
PRBool  aEnableVerify = PR_FALSE,
void aKey = 0,
nsDTDMode  aMode = eDTDMode_autodetect 
) [pure virtual]

Implemented in nsParser.

NS_IMETHOD nsIParser::Parse ( const nsAString &  aSourceBuffer,
void aKey,
const nsACString &  aMimeType,
PRBool  aEnableVerify,
PRBool  aLastCall,
nsDTDMode  aMode = eDTDMode_autodetect 
) [pure virtual]

Implemented in nsParser.

NS_IMETHOD nsIParser::ParseFragment ( const nsAString &  aSourceBuffer,
void aKey,
nsVoidArray aTagStack,
PRBool  aXMLMode,
const nsACString &  aContentType,
nsDTDMode  aMode = eDTDMode_autodetect 
) [pure virtual]

This method gets called when you want to parse a fragment of HTML or XML surrounded by the context |aTagStack|.

It requires that the parser have been given a fragment content sink.

Parameters:
aSourceBufferThe XML or HTML that hasn't been parsed yet.
aKeyThe key used by the parser.
aTagStackThe context of the source buffer.
aXMLModeWhether this is XML or HTML
aContentTypeThe content-type of this document.
aModeThe DTDMode that the parser should parse this fragment in.
Returns:
Success or failure.

Implemented in nsParser.

NS_IMETHOD nsIParser::RegisterDTD ( nsIDTD aDTD) [pure virtual]

Call this method if you have a DTD that you want to share with the parser.

Registered DTD's get remembered until the system shuts down.

gess 3/25/98

Parameters:
aDTD-- ptr DTD that you're publishing the services of

Implemented in nsParser.

Here is the caller graph for this function:

NS_IMETHOD nsIParser::Terminate ( void  ) [pure virtual]

Implemented in nsParser.


Member Data Documentation

Reimplemented in nsParser.

Definition at line 193 of file nsIParser.h.

Definition at line 194 of file nsIParser.h.


The documentation for this class was generated from the following file: