michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsIRDFDataSource.idl" michael@0: #include "nsIStreamListener.idl" michael@0: #include "nsIURI.idl" michael@0: michael@0: [scriptable, uuid(1831dd2e-1dd2-11b2-bdb3-86b7b50b70b5)] michael@0: interface nsIRDFXMLParser : nsISupports michael@0: { michael@0: /** michael@0: * Create a stream listener that can be used to asynchronously michael@0: * parse RDF/XML. michael@0: * @param aSink the RDF datasource the will receive the data michael@0: * @param aBaseURI the base URI used to resolve relative michael@0: * references in the RDF/XML michael@0: * @return an nsIStreamListener object to handle the data michael@0: */ michael@0: nsIStreamListener parseAsync(in nsIRDFDataSource aSink, in nsIURI aBaseURI); michael@0: michael@0: /** michael@0: * Parse a string of RDF/XML michael@0: * @param aSink the RDF datasource that will receive the data michael@0: * @param aBaseURI the base URI used to resolve relative michael@0: * references in the RDF/XML michael@0: * @param aSource a UTF8 string containing RDF/XML data. michael@0: */ michael@0: void parseString(in nsIRDFDataSource aSink, in nsIURI aBaseURI, in AUTF8String aSource); michael@0: };