Thanks, Boris! I want to dump a DOMDocument with a nsIDocumentEncoder, Originally, I use nsIDOMSerializer to serialize the DOMDocument, internally nsIDOMSerializer use nsIDocumentEncoder with nsXMLContentSerializer to serialize the DOMDocument, but Now what I want is a nsIDocumentEncoder with nsHTMLContentSerializer, but the nsIDOMSerializer interface has no way to tell it use "text/html" ContentSerializer.
so I have to directly use nsIDocumentEncoder with a "text/html" ContentSerializeer. and I must get the CharacterSet of the DOMDocument. getting back an nsAString will solve my problem, But I don't want a link-deps with xpcom.so, I want a glue app. Now, I think I can implement a nsHTMLSerializer class just like nsDOMSerializer to solve this problem. By the way, which DOM API can do the same document-dump thing? "Boris Zbarsky" <[email protected]> дÈëÏûÏ¢ÐÂÎÅ:[email protected]... >> nsCString charset; >> nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDocument); >> NS_ASSERTION(doc, "Need a document"); >> nsCString charset= doc->GetDocumentCharacterSet(); > > Is there a reason you're not using the DOM API here instead of the > more-or-less internal nsIDocument interface? If you were, you'd be > getting back an nsAString and shouldn't have any problems, right? > > -Boris
_______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
