Solved

error on: XslTransform var_xsl = new XslTransform();

Posted on 2004-09-16
5
203 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
  • 2
  • 2
5 Comments
 
LVL 10

Assisted Solution

by:123654789987
123654789987 earned 125 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 125 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

749 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