By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,717 Members | 2,069 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,717 IT Pros & Developers. It's quick & easy.

XmlReader Hangs

P: n/a
Hi all

Having problems with the XmlReader object. I'm trying to
transform an XML document with XSLT - and get the
resulting output. My code is as follows:

XsltArgumentList xslArgs = passParameters
(xmlMenu.SelectSingleNode("document/setup")); // just a
local function to get all parameters in the doc
XslTransform xslTransform = new XslTransform();
MemoryStream memStream = new MemoryStream();
XmlTextWriter xmlWriter = new XmlTextWriter(memStream,
XmlDataDocument xmlXslt = new XmlDataDocument();
System.Security.Policy.Evidence evidence = new
XmlUrlResolver xmlResolver = new XmlUrlResolver();
XmlReader xmlReader = null;

StringReader sr = new StringReader(xmlXslt.OuterXml);
XmlTextReader styleReader = new XmlTextReader(sr);
xslTransform.Load(styleReader, xmlResolver, evidence);
xmlReader = xslTransform.Transform(xmlMenu.CreateNavigator
(), xslArgs, xmlResolver);


return xmlReturn;
It worked fine once - and now it hangs after the
xmlReturn.Load(xmlReader); line. My asp_wp process hogs
all the memory so something has gone wrong somewhere.

Can someone help me with this please? Is there something
I need to close at the end of the call?

Any help is much appreciated.

Thanks as always

Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.