• cloudleader
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hello,

 

I want to display the following xml response in a vf page

 

<?xml version="1.0" encoding="utf-8"?>
<weatherdata>
  <location>
    <name>Hyderabad</name>
    <type/>
    <country>IN</country>
    <timezone/>
    <location altitude="0" latitude="17.37528" longitude="78.474442" geobase="geonames" geobaseid="0"/>
  </location>
  <credit/>
  <meta>
    <lastupdate>2013-09-27T05:10:00</lastupdate>
    <calctime>0.0148</calctime>
    <nextupdate>2013-09-27T08:10:00</nextupdate>
  </meta>
  <sun rise="2013-09-27T00:35:45" set="2013-09-27T12:38:05"/>
  <forecast>
    <time day="2013-09-27">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="5.5" type="rain"/>
      <windDirection deg="274" code="W" name="West"/>
      <windSpeed mps="4.36" name="Gentle Breeze"/>
      <temperature day="32.04" min="23.12" max="33.35" night="23.12" eve="33.35" morn="28"/>
      <pressure unit="hPa" value="961.68"/>
      <humidity value="73" unit="%"/>
      <clouds value="sky is clear" all="8" unit="%"/>
    </time>
    <time day="2013-09-28">
      <symbol number="800" name="sky is clear" var="01n"/>
      <precipitation/>
      <windDirection deg="296" code="WNW" name="West-northwest"/>
      <windSpeed mps="3.8" name="Gentle Breeze"/>
      <temperature day="23.72" min="23.72" max="30.26" night="24.37" eve="30.26" morn="23.72"/>
      <pressure unit="hPa" value="960.8"/>
      <humidity value="92" unit="%"/>
      <clouds value="sky is clear" all="0" unit="%"/>
    </time>
    <time day="2013-09-29">
      <symbol number="800" name="sky is clear" var="01d"/>
      <precipitation/>
      <windDirection deg="288" code="WNW" name="West-northwest"/>
      <windSpeed mps="4.21" name="Gentle Breeze"/>
      <temperature day="27.32" min="23.76" max="31.25" night="24.6" eve="30.27" morn="23.76"/>
      <pressure unit="hPa" value="960.04"/>
      <humidity value="78" unit="%"/>
      <clouds value="sky is clear" all="0" unit="%"/>
    </time>
    <time day="2013-09-30">
      <symbol number="803" name="broken clouds" var="04n"/>
      <precipitation/>
      <windDirection deg="267" code="W" name="West"/>
      <windSpeed mps="4.46" name="Gentle Breeze"/>
      <temperature day="22.68" min="22.68" max="28.61" night="24.53" eve="28.61" morn="22.68"/>
      <pressure unit="hPa" value="957.04"/>
      <humidity value="92" unit="%"/>
      <clouds value="broken clouds" all="56" unit="%"/>
    </time>
    <time day="2013-10-01">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="7.45" type="rain"/>
      <windDirection deg="302" code="WNW" name="West-northwest"/>
      <windSpeed mps="5.01" name="Gentle Breeze"/>
      <temperature day="26.6" min="21.68" max="27.03" night="27.03" eve="26.6" morn="21.68"/>
      <pressure unit="hPa" value="960.13"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="14" unit="%"/>
    </time>
    <time day="2013-10-02">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="4.68" type="rain"/>
      <windDirection deg="284" code="WNW" name="West-northwest"/>
      <windSpeed mps="6.47" name="Moderate breeze"/>
      <temperature day="27.03" min="23.29" max="27.7" night="23.29" eve="27.7" morn="27.03"/>
      <pressure unit="hPa" value="959.65"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="18" unit="%"/>
    </time>
    <time day="2013-10-03">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="3.25" type="rain"/>
      <windDirection deg="283" code="WNW" name="West-northwest"/>
      <windSpeed mps="7.78" name="Moderate breeze"/>
      <temperature day="26.75" min="22.33" max="27.19" night="24.95" eve="27.19" morn="22.33"/>
      <pressure unit="hPa" value="958.26"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="17" unit="%"/>
    </time>
  </forecast>
</weatherdata>

 

Hello,

 

I want to display the following xml response in a vf page

 

<?xml version="1.0" encoding="utf-8"?>
<weatherdata>
  <location>
    <name>Hyderabad</name>
    <type/>
    <country>IN</country>
    <timezone/>
    <location altitude="0" latitude="17.37528" longitude="78.474442" geobase="geonames" geobaseid="0"/>
  </location>
  <credit/>
  <meta>
    <lastupdate>2013-09-27T05:10:00</lastupdate>
    <calctime>0.0148</calctime>
    <nextupdate>2013-09-27T08:10:00</nextupdate>
  </meta>
  <sun rise="2013-09-27T00:35:45" set="2013-09-27T12:38:05"/>
  <forecast>
    <time day="2013-09-27">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="5.5" type="rain"/>
      <windDirection deg="274" code="W" name="West"/>
      <windSpeed mps="4.36" name="Gentle Breeze"/>
      <temperature day="32.04" min="23.12" max="33.35" night="23.12" eve="33.35" morn="28"/>
      <pressure unit="hPa" value="961.68"/>
      <humidity value="73" unit="%"/>
      <clouds value="sky is clear" all="8" unit="%"/>
    </time>
    <time day="2013-09-28">
      <symbol number="800" name="sky is clear" var="01n"/>
      <precipitation/>
      <windDirection deg="296" code="WNW" name="West-northwest"/>
      <windSpeed mps="3.8" name="Gentle Breeze"/>
      <temperature day="23.72" min="23.72" max="30.26" night="24.37" eve="30.26" morn="23.72"/>
      <pressure unit="hPa" value="960.8"/>
      <humidity value="92" unit="%"/>
      <clouds value="sky is clear" all="0" unit="%"/>
    </time>
    <time day="2013-09-29">
      <symbol number="800" name="sky is clear" var="01d"/>
      <precipitation/>
      <windDirection deg="288" code="WNW" name="West-northwest"/>
      <windSpeed mps="4.21" name="Gentle Breeze"/>
      <temperature day="27.32" min="23.76" max="31.25" night="24.6" eve="30.27" morn="23.76"/>
      <pressure unit="hPa" value="960.04"/>
      <humidity value="78" unit="%"/>
      <clouds value="sky is clear" all="0" unit="%"/>
    </time>
    <time day="2013-09-30">
      <symbol number="803" name="broken clouds" var="04n"/>
      <precipitation/>
      <windDirection deg="267" code="W" name="West"/>
      <windSpeed mps="4.46" name="Gentle Breeze"/>
      <temperature day="22.68" min="22.68" max="28.61" night="24.53" eve="28.61" morn="22.68"/>
      <pressure unit="hPa" value="957.04"/>
      <humidity value="92" unit="%"/>
      <clouds value="broken clouds" all="56" unit="%"/>
    </time>
    <time day="2013-10-01">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="7.45" type="rain"/>
      <windDirection deg="302" code="WNW" name="West-northwest"/>
      <windSpeed mps="5.01" name="Gentle Breeze"/>
      <temperature day="26.6" min="21.68" max="27.03" night="27.03" eve="26.6" morn="21.68"/>
      <pressure unit="hPa" value="960.13"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="14" unit="%"/>
    </time>
    <time day="2013-10-02">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="4.68" type="rain"/>
      <windDirection deg="284" code="WNW" name="West-northwest"/>
      <windSpeed mps="6.47" name="Moderate breeze"/>
      <temperature day="27.03" min="23.29" max="27.7" night="23.29" eve="27.7" morn="27.03"/>
      <pressure unit="hPa" value="959.65"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="18" unit="%"/>
    </time>
    <time day="2013-10-03">
      <symbol number="501" name="moderate rain" var="10d"/>
      <precipitation value="3.25" type="rain"/>
      <windDirection deg="283" code="WNW" name="West-northwest"/>
      <windSpeed mps="7.78" name="Moderate breeze"/>
      <temperature day="26.75" min="22.33" max="27.19" night="24.95" eve="27.19" morn="22.33"/>
      <pressure unit="hPa" value="958.26"/>
      <humidity value="0" unit="%"/>
      <clouds value="few clouds" all="17" unit="%"/>
    </time>
  </forecast>
</weatherdata>