Solved

error on: XslTransform var_xsl = new XslTransform();

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now