Solved

Response write xml from XmlDataDocument

Posted on 2009-03-31
2
544 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

707 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