c# - Problems getting XML content -


i'm trying content current loading page using awesomium. if page xml(rss) result incorrect. test program demonstrate problems

using system; using system.diagnostics; using system.threading; using system.threading.tasks; using awesomium.core;  namespace awesomiumtest {     class program     {         static void main(string[] args)         {             webcore.initialize(new webconfig()             {                 loglevel = loglevel.none             });              string result;              //example #1             //ok             writepagetoconsole("http://www.google.com/");              //example #2             //small problem. result has added tags , replace "<" ">" "&lt;" "&gt;"             writepagetoconsole("http://social.msdn.microsoft.com/search/es-es/feed?query=vb&format=rss");              //example #3             //big problem. result = 'undefined' !!!!!!!             writepagetoconsole("http://prmac.com/rss-ct-d.htm");              console.readkey();         }          static void writepagetoconsole(string url)         {             using (websession session = webcore.createwebsession(new webpreferences()))             {                 using (webview view = webcore.createwebview(1280, 960, session))                 {                    bool finishedloading = false;                      view.loadingframecomplete += (s, e) =>                     {                         if (e.ismainframe)                             finishedloading = true;                     };                      view.source = url.touri();                      while (!finishedloading)                     {                         thread.sleep(100);                         webcore.update();                     }                      string doctagname = view.executejavascriptwithresult("document.documentelement.tagname").tostring();                     string outerhtml= view.executejavascriptwithresult("document.documentelement.outerhtml").tostring();                      console.writeline("document tagname: " + doctagname);                     console.writeline("part of content: " + outerhtml.substring(0, math.min(300, outerhtml.length)));                     console.writeline();                 }             }         }     } } 

console looking this:

example #1

document tagname: html

part of content: <html itemscope="" itemtype="http://schema.org/webpage"><head><meta content="Поиск информации в интернете: веб страницы, картинки, видео и многое другое." name="description"><meta content="noodp" name="robots"><meta itemprop="image" content="/images/google_favicon_128.png"><title>google</title><scri

example #2

document tagname: html

part of content: <html><head></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;rss xmlns:a10="http://www.w3.org/2005/atom" version="2.0"&gt;&lt;channel&gt;&lt;title&gt;buscar en msdn&lt;/title&gt;&lt;description&gt;use msdn para buscar en la web.&lt;/description&gt;&lt;item&gt;&lt;link&gt;h

example #3

document tagname: rss

part of content: undefined

what correct way page content in example #2 , #3?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -