AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Saving Document XML Source from TWebbrowser
Thema durchsuchen
Ansicht
Themen-Optionen

Saving Document XML Source from TWebbrowser

Ein Thema von Delphi-Lover · begonnen am 9. Okt 2006 · letzter Beitrag vom 10. Okt 2006
 
Delphi-Lover

Registriert seit: 19. Okt 2004
Ort: Amsterdam
30 Beiträge
 
Delphi 2005 Professional
 
#1

Saving Document XML Source from TWebbrowser

  Alt 9. Okt 2006, 16:59
Hello,

For saving the internetpage loaded in the TWebbrowser-component are two properties.
like : Document.Body.InnerHTML and Document.Body.InnerText (and the two OuterHTML, OuterText)

The problem with the InnerHTML property is that the browser already rendered the page received, so it is including all kinds of extra HTML tags:

Original XML from the webserver:

<?xml version="1.0" encoding="UTF-8"?>
<Delphi exampe-version="1.0">&gt;
<tag>
<text>Delphi is great</text>
....

The InnerHTML will give:

<DIV class=e><SPAN class=b></SPAN> <SPAN class=m>&lt;?</SPAN><SPAN class=pi>xml version="1.0" encoding="UTF-8" </SPAN><SPAN class=m>?&gt;</SPAN> </DIV>
<DIV class=e>......

The problem with the InnerText is that it will include "-" symbols, like the Internet Explorer does if it loads a XML file. (You can click on these "-" to open and close the nodes of the XML)

So the InnerText gives:

<?xml version="1.0" encoding="UTF-8" ?>
- <Delphi exampe-version="1.0">
>
- <tag>

As you see it corrupts also the XML source file.

Question: Anyone knows how to save the real XML file received by the Webbrowser?
If you use the "view source" option in the browser the XML-file will open OK without any formatting by the browser.
How can you simulate this option and save it to file??

Greets,

Delphi-Lover.
Rob
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:34 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz