Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Fetch & Read XML Data into HTML File? >Thread Next - Re: Fetch & Read XML Data into HTML File? Re: Fetch & Read XML Data into HTML File?To: NULL Date: 9/8/2008 10:04:00 AM
"Martin Honnen" <mahotrash@y...> wrote in message
news:%23kLUDQbEJHA.2292@T......
> Richard In Va. wrote:
>> Would anyone know how I can fetch and read xml data to display in a html
>> file?
>>
>> I'm building a local (unpublished) webpage to be a personal homepage on
>> my PC. When I open/refresh the html file, I would like it to fetch an
>> xml file type <?xml version="1.0" encoding="ISO-8859-1" ?> from the
>> internet and parse/read some of the data to display in the webpage using
>> standard html/ccs.
>
> You could build a HTA (HTML application) on Windows and then use
> JavaScript and MSXML to load and parse the XML document.
> I suggest using a HTA instead of a normal web page as with normal web
> pages rendered in a browser you are not allowed to access domains other
> than the one your HTML document has been loaded from.
> HTAs are documented here:
> http://msdn.microsoft.com/en-us/library/ms536471(vs.85).aspx
>
> MSXML documentation is here:
> http://msdn.microsoft.com/en-us/library/ms763742(VS.85).aspx
>
> If you need help writing JavaScript using MSXML to parse your XML document
> then post the URL of the XML and tell us which elements and/or attributes
> you want to read.
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
Thanks Martin for your reply!
URL for XML file = http://xoap.weather.com/weather/local/23218?cc=&dayf=7
Elements / attributes I'm interested in...
<dnam>?</dnam>
<tm>?</tm>
<lsup>?</lsup>
<tmp>?</tmp>
<t>?</t>
<hmid>?</hmid>
<dayf>
<day d="?" day t="?" dt="?">
<hi>?</hi>
<lo>?</lo>
<part p="d">
<t>?</t>
<ppcp>?</ppcp>
<hmid>?</hmid>
</part>
</day>
<day d="1" t="?" dt="?">
etc....
"?" = the data I want to display in my homepage.
(same elements for day #0 thru day #6)
I was hoping that the xml file could be fetched from the web, then read from
cache avoiding the browser across domain issue. Also, don't know much about
writing scripts, but I have edited several for a custom fit. Never know,
later I may want to add-in or remove unused elements.
Thanks Martin for your reply... hope I'm not asking for too much. I briefly
looked at your HTA link and will do further reading, that might work well.
Thanks again!
Richard in VA.
+++++++++++
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
