?
Solved

error on: XslTransform var_xsl = new XslTransform();

Posted on 2004-09-16
5
Medium Priority
?
206 Views
Last Modified: 2010-04-15
Hi experts
I am facing problem below:
I have following code and it gives an error on first line

-------------------------------------
XslTransform var_xsl = new XslTransform();
var_xsl.Load("test.xsl");
XmlDocument var_xml = new XmlDocument();
var_xml.LoadXml(var_some_xml);
StringWriter var_str_writer = new StringWriter();
var_xsl.Transform(var_xml, null, var_str_writer);

------------------------------------
error:
Object reference not set to an instance of an object

Please can anybody help me?

Thanks
0
Comment
Question by:Brutso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 10

Assisted Solution

by:123654789987
123654789987 earned 500 total points
ID: 12074215
I tried u'r code it is not  giving any error in the first line. It lookss fine.
0
 
LVL 8

Accepted Solution

by:
Razzie_ earned 500 total points
ID: 12074377
Are you SURE you get that error on that first line of code? I can't think of any reason why it give an error, at least not the error message you get. The more I think about it, the more I think it's impossible. Please check the line and code of your error message!
0
 
LVL 1

Author Comment

by:Brutso
ID: 12082240
Oh, Sorry experts.
I found bug in my script. It's in

var_xsl.Load("test.xsl");

the URL is wrong.

I agree to give poins to both experts: 123654789987 and Razzie_, but i don't know how to make it.
0
 
LVL 8

Expert Comment

by:Razzie_
ID: 12082416
You can click 'split points' and split them in half OR,

ask in the Community TA to have your points refunded because you found the answer yourself.
0
 
LVL 1

Author Comment

by:Brutso
ID: 12082694
ok. thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question