Click here to Skip to main content
11,926,429 members (60,017 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# HTTP
I've got a program that loads the XML time of 1 hour from the site
I have to catch the response from the server, and at its base to launch an alert. Unfortunately the program can not add / expand. The only way that I can see is the capture.
But how to do it - I do not know.
Posted 10-Jan-13 0:30am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

        <title>JavaScript, the Definitive Guide</title>
        <author>David Flanagan</author>
        <cover src="/images/cover_defguide.jpg" />
        <blurb>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</blurb>
        <title>DOM Scripting</title>
        <publisher>Friends of Ed</publisher>
        <author>Jeremy Keith</author>
        <cover src="/images/cover_domscripting.jpg" />
        <blurb>Praesent et diam a ligula facilisis venenatis.</blurb>
        <title>DHTML Utopia: Modern Web Design using JavaScript &amp; DOM</title>
        <author>Stuart Langridge</author>
        <cover src="/images/cover_utopia.jpg" />
        <blurb>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</blurb>

function setDataXML(req)
    var books = req.responseXML.getElementsByTagName('book');
    for (var i=0;i<books.length;i++)
        var x = document.createElement('div');
        x.className = 'book';
        var y = document.createElement('h3');
        var z = document.createElement('p');
        z.className = 'moreInfo';
        z.appendChild(document.createTextNode('By ' + getNodeValue(books[i],'author') + ', ' + getNodeValue(books[i],'publisher')));
        var a = document.createElement('img');
        a.src = books[i].getElementsByTagName('cover')[0].getAttribute('src');
        var b = document.createElement('p');
function getNodeValue(obj,tag)
    return obj.getElementsByTagName(tag)[0].firstChild.nodeValue;
Radzhab 10-Jan-13 10:29am
What is it ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 13 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100