How to render HTML code in Windows Mobile Code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kapil Choubisa
    New Member
    • Sep 2009
    • 47

    How to render HTML code in Windows Mobile Code?

    Hello friends.
    I don't Know that How can I render html information in windows Mobile application.
    When I try any Html tag it display the same like
    <p>this is my first app</p>

    Can nybody tell me how to render this information in WM.
    is there any tool or any other way.

    Please help me.
    Thank you............ .
  • markmcgookin
    Recognized Expert Contributor
    • Dec 2006
    • 648

    #2
    You can manually create an html file (through code if you want) then add a browser object to your form, then pass the path of the html file you created to the browser object (standard Control in the toolbar) as it's URL property with the "file://" prefix

    Comment

    • Kapil Choubisa
      New Member
      • Sep 2009
      • 47

      #3
      yes but I have HTML contents in a XML file. While I click on a menu the html content should be shown.
      do you want to say that for this purpose T have to open a browser on click of that menu?
      and if yes than How can do this with reading only html content not the XML. while both are in same file.

      Thanx once again for replying me and helping me.

      Comment

      • markmcgookin
        Recognized Expert Contributor
        • Dec 2006
        • 648

        #4
        Is the .xml file formatted in html? Then you could pass that to the browser object you are putting on your form.

        Or is the html buried in the XML? ... in that case you would need to create a valid html document once you have extracted the appropriate data, then pass this as the URL to the Browser. The Browser control thing is probably the only way you are going to render html accurately without having to write your own code to parse it.

        Here is an example of someone using a web browser control (although they are using it in tabs)



        this is a link to an MSDN article about the control

        Comment

        • Kapil Choubisa
          New Member
          • Sep 2009
          • 47

          #5
          I have a XML file. In it I have a CDATA section for HTML Information. I need that Information in a browser.
          Can any body help me to find out it.
          My XML an HTML are in this format

          Code:
          <paragraph>
                    <position>1</position>
                    <title>Title</title>
                    <text>
                      <![CDATA[<p style="text-align: center;"><span style="color: #800000;"><span style="font-size: xx-large;">Wings of Pride </span></span><br /><br /><span style="color: #800000;">Adnan K&euml;r&ccedil;agu </span><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<span style="font-size: small;">Love is stronger than the fear&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;compassion is the true source of the tear <br />care for the one who is yours, for the one who is dear &nbsp;&nbsp; &nbsp;<br />there is nothing that&rsquo;s impossible to bear &nbsp;</span><br /><br /><span style="font-size: small;"><em><span style="color: #000080;">Special thanks for great support to my brother: Fatan K&euml;r&ccedil;agu</span></em></span></p>
          <p style="text-align: center;"><span style="font-size: small;"><em><span style="color: #000080;"><br /></span></em></span></p>]]>
                    </text>
                    <image_path></image_path>
                  </paragraph>
          I want to retrive only the Html value in a browser how can I do it.

          When I select The title node I need to retrive the HTML Information.
          I have this information in a XmlNodelist by Xpath.
          How can I do it?

          Comment

          • Kapil Choubisa
            New Member
            • Sep 2009
            • 47

            #6
            Hi! All, I had solved the problem before myself but
            I am facing a new problem.
            Please help me as soon as possible.
            I retrieved the HTML information siccessfully. but the problem is this Information is in HTML formate and not in a file.
            Its is in a variable.
            How can I pass a variable value in Windows Mobile browser as an URL.

            Browser should read the variable and display the Information as web page.

            IS it possible if Yes then how.
            Plz help me.

            Comment

            Working...