Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Response write xml from XmlDataDocument

Posted on 2009-03-31
2
Medium Priority
?
550 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

604 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