Struct xpcom::interfaces::nsISAXXMLReader [] [src]

#[repr(C)]
pub struct nsISAXXMLReader { /* fields omitted */ }

interface nsISAXXMLReader : nsIStreamListener

/**
 * Interface for reading an XML document using callbacks.
 *
 * NOTE: This file (and related ones) used to implement a full-featured SAX XML
 * parser. But we have few uses of this interface and the ones we have only use
 * a fraction of the full SAX functionality. So in bug 1416038 we removed a lot
 * of it. See the changes associated with that bug if you need to reintroduce
 * any of that functionality.
 *
 * nsISAXXMLReader is the interface that an XML parser's SAX2
 * driver must implement.  This interface allows an application to set
 * and query features and properties in the parser, to register event
 * handlers for document processing, and to initiate a document
 * parse.
 */

Methods

impl nsISAXXMLReader
[src]

[src]

Cast this nsISAXXMLReader to one of its base interfaces.

impl nsISAXXMLReader
[src]

[src]

/**
   * The base URI.
   */

attribute nsIURI baseURI;

[src]

/**
   * The base URI.
   */

attribute nsIURI baseURI;

[src]

/**
   * If the application does not register a content handler, all
   * content events reported by the SAX parser will be silently
   * ignored.
   *
   * Applications may register a new or different handler in the
   * middle of a parse, and the SAX parser must begin using the new
   * handler immediately.
   */

attribute nsISAXContentHandler contentHandler;

[src]

/**
   * If the application does not register a content handler, all
   * content events reported by the SAX parser will be silently
   * ignored.
   *
   * Applications may register a new or different handler in the
   * middle of a parse, and the SAX parser must begin using the new
   * handler immediately.
   */

attribute nsISAXContentHandler contentHandler;

[src]

/**
   * If the application does not register an error handler, all
   * error events reported by the SAX parser will be silently ignored;
   * however, normal processing may not continue.  It is highly
   * recommended that all SAX applications implement an error handler
   * to avoid unexpected bugs.
   *
   * Applications may register a new or different handler in the
   * middle of a parse, and the SAX parser must begin using the new
   * handler immediately.
   */

attribute nsISAXErrorHandler errorHandler;

[src]

/**
   * If the application does not register an error handler, all
   * error events reported by the SAX parser will be silently ignored;
   * however, normal processing may not continue.  It is highly
   * recommended that all SAX applications implement an error handler
   * to avoid unexpected bugs.
   *
   * Applications may register a new or different handler in the
   * middle of a parse, and the SAX parser must begin using the new
   * handler immediately.
   */

attribute nsISAXErrorHandler errorHandler;

[src]

/**
   * @param str The UTF16 string to be parsed
   * @param contentType The content type of the string (see parseFromStream)
   */

void parseFromString (in AString str, in string contentType);

[src]

/**
   * @param stream The byte stream whose contents are parsed
   * @param charset The character set that was used to encode the byte
   *                stream. NULL if not specified.
   * @param contentType The content type of the string - either text/xml,
   *                    application/xml, or application/xhtml+xml.
   *                    Must not be NULL.
   */

void parseFromStream (in nsIInputStream stream, in string charset, in string contentType);

[src]

/**
   * Begin an asynchronous parse. This method initializes the parser,
   * and must be called before any nsIStreamListener methods. It is
   * then the caller's duty to call nsIStreamListener methods to drive
   * the parser. Once this method is called, the caller must not call
   * one of the other parse methods.
   *
   * @param observer The nsIRequestObserver to notify upon start or stop.
   *                 Can be NULL.
   */

void parseAsync (in nsIRequestObserver observer);

Methods from Deref<Target = nsIStreamListener>

[src]

Cast this nsIStreamListener to one of its base interfaces.

[src]

/**
     * Called when the next chunk of data (corresponding to the request) may
     * be read without blocking the calling thread.  The onDataAvailable impl
     * must read exactly |aCount| bytes of data before returning.
     *
     * @param aRequest request corresponding to the source of the data
     * @param aContext user defined context
     * @param aInputStream input stream containing the data chunk
     * @param aOffset
     *        Number of bytes that were sent in previous onDataAvailable calls
     *        for this request. In other words, the sum of all previous count
     *        parameters.
     * @param aCount number of bytes available in the stream
     *
     * NOTE: The aInputStream parameter must implement readSegments.
     *
     * An exception thrown from onDataAvailable has the side-effect of
     * causing the request to be canceled.
     */

void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long long aOffset, in unsigned long aCount);

Trait Implementations

impl XpCom for nsISAXXMLReader
[src]

IID: nsIID = nsID(1528686594, 37009, 17743, [153, 114, 87, 83, 192, 208, 199, 14])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsISAXXMLReader
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsISAXXMLReader
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.