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
Solved

error on: XslTransform var_xsl = new XslTransform();

Posted on 2004-09-16
5
202 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

840 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