Solved

Response write xml from XmlDataDocument

Posted on 2009-03-31
2
541 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
2 Comments
 
LVL 14

Accepted Solution

by:
jjardine earned 250 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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reset asp.net login password 4 42
What namespace do I need to import? 2 29
ck editor is taking too much time to be loaded in asp 1 18
tutorial for ebay api 3 35
Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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