Hi,
constructDomDocument method just parses the string
passed to it and constructs nsIDOMDocument.I call this
method from another method say execute().
The problem comes when i try to access methods of
nsIDOMDocument from execute(), it throws fatal
signal.But the same works when i try to call from
constructDomDocument.
NS_IMETHODIMP execute()
{
nsString s;
s.AssignWithConversion("<employee name="x"/>");
nsIDOMDocument* domdoc
constructDomDocument(s,&domdoc);
nsString element;
//runtime error occurs while executing below said line
domdoc->GetDocumentElement(element);
}
NS_IMETHODIMP constructDomDocument(nsAString&
xmlstr,nsIDOMDocument** domdoc)
{
nsresult result;
nsCOMPtr<nsIDOMParser>domparser =
do_CreateInstance(NS_DOMPARSER_CONTRACTID,&result);
nsCOMPtr<nsIDOMDocument>domdocument;
domparser->ParseFromString(((nsString)xmlstr).get(),"text/xml",getter_AddRefs(domdocument));
if(domdocument)
{
*domdoc = domdocument;
return NS_OK;
}
return NS_ERROR_FAILURE;
}
Please help me to find my problem.
Thanks and Regards
A.SathishKumar
__________________________________
Do you Yahoo!?
Yahoo! Domains � Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom