Mapping xml data to the html formatting - InfoPath Dev
in

InfoPath Dev

Mapping xml data to the html formatting

Last post 11-06-2012 05:56 AM by sarajday. 19 replies.
Page 2 of 2 (20 items) < Previous 1 2
Sort Posts: Previous Next
  • 10-23-2012 06:43 AM In reply to

    Re: Mapping xml data to the html formatting

    Anyone else have suggestions for this?

    Thanks

  • 10-23-2012 01:26 PM In reply to

    Re: Mapping xml data to the html formatting

    ok, I got this working partly, but the html is rendered very messy. Im trying to figure out now why the html output is writing in a poor format. What I have in code behind on form is below:

      //1.Loading the XSLT style sheet manually specify location


                          XslCompiledTransform myStyleSheet = new XslCompiledTransform();
                          myStyleSheet.Load(@"C:\development\test2\test3\view2.xsl");
                  
      //2.Load the XML document

                           XPathDocument myXMLStuff = new XPathDocument(@"C:\development\test2\test3\sampledata2.xml");


      //3.Declare writer

                           XmlTextWriter myNewWebPage = new XmlTextWriter(@"C:\development\test2\test3\sampledatahtml.html", null);
               
      //4. Transform

                         myStyleSheet.Transform(myXMLStuff, null, myNewWebPage);    

    Is there a better way to do this so the html output is not messy?

    Thanks

  • 10-23-2012 07:25 PM In reply to

    Re: Mapping xml data to the html formatting

    If you want to generate HTML from XML data then you should have formulated this as such from the very start

    This is different from mapping which is understood as if you wanted to access HTML fields from code of Infopath Form Web Part Page (generated and used by enterprise Infopath Forms Services of Sharepoint Server 2010)

    As well as it is not mapping XML to HTML formatting  but vice versa

    labyrinth248:
    s there a better way to do this so the html output is not messy?
     

    So, create and use your own XSL file

    PS
    This is unrelated to Infopath (or sharepoint) and there are specialized discussion boards on XSLT
    If I involve me in a discussion on an Infopath forum, it is because I want, need and/or have time to discuss Infopath-related issues
    and if I I want, need and/or have time to other topics, for example on XSLT,, then I participate in those discussions on respective forums/topics. 

    Otherwise, I found me (and involve others) in awkward situation having wasted my time in vain and off-topic

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 10-24-2012 05:48 AM In reply to

    Re: Mapping xml data to the html formatting

    Gennady, Right, Thanks. I'll figure it out on my own.
  • 11-06-2012 05:56 AM In reply to

    Re: Mapping xml data to the html formatting

    what about using an xml data mapper tool?

Page 2 of 2 (20 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.