?
Solved

Response write xml from XmlDataDocument

Posted on 2009-03-31
2
Medium Priority
?
548 Views
Last Modified: 2012-05-06
I have an DS that I convert to XML and then use a XSLT to create a table. I can't figure out how to write out the actual XML that is being created. How would I do it?
public void CurrentBuilder()
    {
        vw_currents MyProject = new vw_currents();
        DataSet ds = MyProject.getCurrents();
        if (ds.Tables[0].Rows.Count > 0)
        {
            XmlDataDocument XMLDD = new XmlDataDocument(ds);
            CreateDataTable(XMLDD, "../xslt/Admins.xslt", Convert.ToString(1), 3);
        }
    }
 
public bool CreateDataTable(XmlDataDocument XMLDD, string XSLTPath, string ID, int whichone)
    {
        bool WasComp = false;
        try
        {
            System.IO.StringWriter MyString = new System.IO.StringWriter();
            XslCompiledTransform XmlToHtml = new XslCompiledTransform();
            XmlToHtml.Load(HttpContext.Current.Server.MapPath(XSLTPath));
            XmlToHtml.Transform(XMLDD, null, MyString);
            lblcheckin.Text = MyString.ToString();
           
 
 
 
 
            WasComp = true;
        }
        catch (Exception ex)
        {
            throw (ex);
        }
        return WasComp;
    }

Open in new window

0
Comment
Question by:NickMalloy
[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 Comments
 
LVL 14

Accepted Solution

by:
jjardine earned 1000 total points
ID: 24035325
YOu may want to use a literal control instead of the label if you want to use that to output the transform.  Is this just a small piece of the page or the entire page?
0
 

Author Comment

by:NickMalloy
ID: 24039695
It is just a small piece. What I want to see is that Actual XML being produced. Not the transformation.
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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

771 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