Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XMLDOM - Load XSL from a String [Thread Next] Re: XMLDOM - Load XSL from a StringTo: NULL Date: 6/11/2009 6:27:00 PM arun.p.k wrote:
> Not Working:
> xmldoc.load(string with contents of source.xml);
Well the method expects a URL or file name, not the XML markup. Use
loadXML in that case
if (xmldoc.loadXML(stringWithXmlMarkup))
{
// loaded successfully
}
else
{
// handle xmldoc.parseError.reason here
}
loadXML is specific to Microsoft's MSXML, I assume you are using that.
For JavaScript inside Mozilla you would use
var xmldoc = new DOMParser().parseFromString(stringWithXmlMarkup,
'application/xml');
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
