473,387 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how can i read the nodes of this file in asp.net???

hi there,

i have an xml file, but am not too sure how to read all these elements using
vb.net code.

any help would be greatly appreciated:))
<---------CODE--------------->

<?xml version="1.0" encoding="utf-8"?>
<weatherFeed>
<CurrentConditions>
<country>Albania</country>
<city>Tirana</city>
<weatherImageURL>cloudy.gif</weatherImageURL>
<celcius>14°C</celcius>
<farenheit>57°F</farenheit>
<description>Partly Cloudy</description>
<relativeHumidity>61%</relativeHumidity>
<wind>WSW at 10 mph (16 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>4:36 PM</sunset>
<barometricPressure>26.1Hg (F)</barometricPressure>
<lastUpdated>15/01/2004 13:21:14</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Thursday</day>
<highCelcius>14°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>58°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day1>
<Day2>
<day>Friday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>34°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day2>
<Day3>
<day>Saturday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day3>
<Day4>
<day>Sunday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-1°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>31°F</lowFarenheit>
<imageURL>rain.gif</imageURL>
</Day4>
<Day5>
<day>Monday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-4°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>24°F</lowFarenheit>
<imageURL>snow.gif</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
</weatherFeed>
<---------CODE--------------->

thanks in advance,
PM
Nov 12 '05 #1
6 1540
Hi Paul,

The following is one way (of many ways) you can get at the elements in your
document. I find this way easy to follow and I'm sure there are more
elegant ways of accomplishing the same end result.

1. You can use the xmldocument class to load in your xml document. This
class exists in system in the system.xml namespace.
e.g. Dim myXMLDoc as new xmldocument()

Try
myXMLDoc.load(<path and filename of your xml document>

Catch
....

2. Declare the following xmlelement types
Dim xe_CurrentConditions as XMLElement
Dim xe_CurrentConditionsChild As XMLElement
Dim xe_FiveDayForecast as XMLElement
Dim xe_FiveDayForecastDay as XMLElement
Dim xe_FiveDayForecastDayDetails as XMLElement

3. Set your elements by doing the following

xe_CurrentConditions =
myXMLDoc.SelectSingleNode("/weatherFeed/CurrentConditions") ' The string
in the function is an xpath expression

' this is extremely important to get familiar with when working with

' xml documents ALSO XML and XPath ARE CASE SENSTIVE AS WELL
4. You can cycle through your xe_CurrentConditions by using the following
loop

For Each xe_CurrentConditionsChild in xe_CurrentConditions.childNodes
Dim strThisElementName as String
Dim strThisElementValue as String

strThisElementName = xe_CurrentConditionsChild.Name ' Should
yield country this 1st time thru your loop
strThisElementValue = xe_CurrentConditionsChild.InnerText '
Should Albania 1st time thru
Next

5. You can cycle through your FiveDayForecast by doing the same thing by
using a nested For Each and getting your

xe_FiveDayForecast =
myXMLDoc.SelectSingleNode("weatherFeed/CurrentConditions/fiveDayForecast")

For Each xe_FiveDayForecastDay in xe_xe_FiveDayForecast.ChildNodes
' the elemnt name of xe_FiveDayForecastDay will be Day1 the first
time thru, Day2 the 2nd time thru...
For Each xe_FiveDayForecastDayDetails in
xe_FiveDayForecastDay.ChildNodes
Dim strThisElementName as String
Dim strThisElementValue as String

' This will let you cycle through each <day>
<highCelius><lowCelius> elements You can use them as you see fit.
strThisElementName = xe_CurrentConditionsChild.Name '
element name is
strThisElementValue = xe_CurrentConditionsChild.InnerText
Next
Next

I hope this helps.

Larry R

"Paul M" <mi******@hotmail.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
hi there,

i have an xml file, but am not too sure how to read all these elements using vb.net code.

any help would be greatly appreciated:))
<---------CODE--------------->

<?xml version="1.0" encoding="utf-8"?>
<weatherFeed>
<CurrentConditions>
<country>Albania</country>
<city>Tirana</city>
<weatherImageURL>cloudy.gif</weatherImageURL>
<celcius>14°C</celcius>
<farenheit>57°F</farenheit>
<description>Partly Cloudy</description>
<relativeHumidity>61%</relativeHumidity>
<wind>WSW at 10 mph (16 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>4:36 PM</sunset>
<barometricPressure>26.1Hg (F)</barometricPressure>
<lastUpdated>15/01/2004 13:21:14</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Thursday</day>
<highCelcius>14°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>58°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day1>
<Day2>
<day>Friday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>34°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day2>
<Day3>
<day>Saturday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day3>
<Day4>
<day>Sunday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-1°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>31°F</lowFarenheit>
<imageURL>rain.gif</imageURL>
</Day4>
<Day5>
<day>Monday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-4°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>24°F</lowFarenheit>
<imageURL>snow.gif</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
</weatherFeed>
<---------CODE--------------->

thanks in advance,
PM

Nov 12 '05 #2
thanks heaps!!!

this looks like an excellent example. i'll get right onto it and hope to get
it working soon.

regards,
Paul.

"Larry Rubin" <ru****@aeltus.com> wrote in message
news:eA**************@TK2MSFTNGP11.phx.gbl...
Hi Paul,

The following is one way (of many ways) you can get at the elements in your document. I find this way easy to follow and I'm sure there are more
elegant ways of accomplishing the same end result.

1. You can use the xmldocument class to load in your xml document. This
class exists in system in the system.xml namespace.
e.g. Dim myXMLDoc as new xmldocument()

Try
myXMLDoc.load(<path and filename of your xml document>

Catch
....

2. Declare the following xmlelement types
Dim xe_CurrentConditions as XMLElement
Dim xe_CurrentConditionsChild As XMLElement
Dim xe_FiveDayForecast as XMLElement
Dim xe_FiveDayForecastDay as XMLElement
Dim xe_FiveDayForecastDayDetails as XMLElement

3. Set your elements by doing the following

xe_CurrentConditions =
myXMLDoc.SelectSingleNode("/weatherFeed/CurrentConditions") ' The string in the function is an xpath expression

' this is extremely important to get familiar with when working with

' xml documents ALSO XML and XPath ARE CASE SENSTIVE AS WELL
4. You can cycle through your xe_CurrentConditions by using the following
loop

For Each xe_CurrentConditionsChild in xe_CurrentConditions.childNodes
Dim strThisElementName as String
Dim strThisElementValue as String

strThisElementName = xe_CurrentConditionsChild.Name ' Should
yield country this 1st time thru your loop
strThisElementValue = xe_CurrentConditionsChild.InnerText '
Should Albania 1st time thru
Next

5. You can cycle through your FiveDayForecast by doing the same thing by
using a nested For Each and getting your

xe_FiveDayForecast =
myXMLDoc.SelectSingleNode("weatherFeed/CurrentConditions/fiveDayForecast")

For Each xe_FiveDayForecastDay in xe_xe_FiveDayForecast.ChildNodes
' the elemnt name of xe_FiveDayForecastDay will be Day1 the first time thru, Day2 the 2nd time thru...
For Each xe_FiveDayForecastDayDetails in
xe_FiveDayForecastDay.ChildNodes
Dim strThisElementName as String
Dim strThisElementValue as String

' This will let you cycle through each <day>
<highCelius><lowCelius> elements You can use them as you see fit.
strThisElementName = xe_CurrentConditionsChild.Name '
element name is
strThisElementValue = xe_CurrentConditionsChild.InnerText
Next
Next

I hope this helps.

Larry R

"Paul M" <mi******@hotmail.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
hi there,

i have an xml file, but am not too sure how to read all these elements

using
vb.net code.

any help would be greatly appreciated:))
<---------CODE--------------->

<?xml version="1.0" encoding="utf-8"?>
<weatherFeed>
<CurrentConditions>
<country>Albania</country>
<city>Tirana</city>
<weatherImageURL>cloudy.gif</weatherImageURL>
<celcius>14°C</celcius>
<farenheit>57°F</farenheit>
<description>Partly Cloudy</description>
<relativeHumidity>61%</relativeHumidity>
<wind>WSW at 10 mph (16 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>4:36 PM</sunset>
<barometricPressure>26.1Hg (F)</barometricPressure>
<lastUpdated>15/01/2004 13:21:14</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Thursday</day>
<highCelcius>14°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>58°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day1>
<Day2>
<day>Friday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>34°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day2>
<Day3>
<day>Saturday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day3>
<Day4>
<day>Sunday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-1°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>31°F</lowFarenheit>
<imageURL>rain.gif</imageURL>
</Day4>
<Day5>
<day>Monday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-4°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>24°F</lowFarenheit>
<imageURL>snow.gif</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
</weatherFeed>
<---------CODE--------------->

thanks in advance,
PM


Nov 12 '05 #3
actually, just one more thing.

the CurrentConditions tag, may appear multiple times depending on how many
cities there are for that country.
Is this also easy to implement?

thanks again for your valuable help.

Paul.

"Larry Rubin" <ru****@aeltus.com> wrote in message
news:eA**************@TK2MSFTNGP11.phx.gbl...
Hi Paul,

The following is one way (of many ways) you can get at the elements in your document. I find this way easy to follow and I'm sure there are more
elegant ways of accomplishing the same end result.

1. You can use the xmldocument class to load in your xml document. This
class exists in system in the system.xml namespace.
e.g. Dim myXMLDoc as new xmldocument()

Try
myXMLDoc.load(<path and filename of your xml document>

Catch
....

2. Declare the following xmlelement types
Dim xe_CurrentConditions as XMLElement
Dim xe_CurrentConditionsChild As XMLElement
Dim xe_FiveDayForecast as XMLElement
Dim xe_FiveDayForecastDay as XMLElement
Dim xe_FiveDayForecastDayDetails as XMLElement

3. Set your elements by doing the following

xe_CurrentConditions =
myXMLDoc.SelectSingleNode("/weatherFeed/CurrentConditions") ' The string in the function is an xpath expression

' this is extremely important to get familiar with when working with

' xml documents ALSO XML and XPath ARE CASE SENSTIVE AS WELL
4. You can cycle through your xe_CurrentConditions by using the following
loop

For Each xe_CurrentConditionsChild in xe_CurrentConditions.childNodes
Dim strThisElementName as String
Dim strThisElementValue as String

strThisElementName = xe_CurrentConditionsChild.Name ' Should
yield country this 1st time thru your loop
strThisElementValue = xe_CurrentConditionsChild.InnerText '
Should Albania 1st time thru
Next

5. You can cycle through your FiveDayForecast by doing the same thing by using a nested For Each and getting your

xe_FiveDayForecast =
myXMLDoc.SelectSingleNode("weatherFeed/CurrentConditions/fiveDayForecast")

For Each xe_FiveDayForecastDay in xe_xe_FiveDayForecast.ChildNodes
' the elemnt name of xe_FiveDayForecastDay will be Day1 the first time thru, Day2 the 2nd time thru...
For Each xe_FiveDayForecastDayDetails in
xe_FiveDayForecastDay.ChildNodes
Dim strThisElementName as String
Dim strThisElementValue as String

' This will let you cycle through each <day>
<highCelius><lowCelius> elements You can use them as you see fit.
strThisElementName = xe_CurrentConditionsChild.Name '
element name is
strThisElementValue = xe_CurrentConditionsChild.InnerText
Next
Next

I hope this helps.

Larry R

"Paul M" <mi******@hotmail.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
hi there,

i have an xml file, but am not too sure how to read all these elements

using
vb.net code.

any help would be greatly appreciated:))
<---------CODE--------------->

<?xml version="1.0" encoding="utf-8"?>
<weatherFeed>
<CurrentConditions>
<country>Albania</country>
<city>Tirana</city>
<weatherImageURL>cloudy.gif</weatherImageURL>
<celcius>14°C</celcius>
<farenheit>57°F</farenheit>
<description>Partly Cloudy</description>
<relativeHumidity>61%</relativeHumidity>
<wind>WSW at 10 mph (16 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>4:36 PM</sunset>
<barometricPressure>26.1Hg (F)</barometricPressure>
<lastUpdated>15/01/2004 13:21:14</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Thursday</day>
<highCelcius>14°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>58°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day1>
<Day2>
<day>Friday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>34°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day2>
<Day3>
<day>Saturday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day3>
<Day4>
<day>Sunday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-1°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>31°F</lowFarenheit>
<imageURL>rain.gif</imageURL>
</Day4>
<Day5>
<day>Monday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-4°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>24°F</lowFarenheit>
<imageURL>snow.gif</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
</weatherFeed>
<---------CODE--------------->

thanks in advance,
PM


Nov 12 '05 #4
Paul, I'm glad the example will be of help to you.

In the case of the <CurrentConditions> tag appearing multiple times, you
would establish a For Each loop on a xe_WeatherFeed element.

For example, xe_WeatherFeed = myXMLDoc.SelectSingleNode("/weatherFeed")

' This loop would be the outermost loop in the code example below.
For Each xe_CurrentCondition in xeWeatherFeed.ChildNodes

' The 1st time through would be for your first city, the 2nd time
through would be your 2nd city... etc.

Next

Larry R

"Paul M" <mi******@hotmail.com> wrote in message
news:eX**************@TK2MSFTNGP10.phx.gbl...
actually, just one more thing.

the CurrentConditions tag, may appear multiple times depending on how many
cities there are for that country.
Is this also easy to implement?

thanks again for your valuable help.

Paul.

"Larry Rubin" <ru****@aeltus.com> wrote in message
news:eA**************@TK2MSFTNGP11.phx.gbl...
Hi Paul,

The following is one way (of many ways) you can get at the elements in your
document. I find this way easy to follow and I'm sure there are more
elegant ways of accomplishing the same end result.

1. You can use the xmldocument class to load in your xml document. This class exists in system in the system.xml namespace.
e.g. Dim myXMLDoc as new xmldocument()

Try
myXMLDoc.load(<path and filename of your xml document>

Catch
....

2. Declare the following xmlelement types
Dim xe_CurrentConditions as XMLElement
Dim xe_CurrentConditionsChild As XMLElement
Dim xe_FiveDayForecast as XMLElement
Dim xe_FiveDayForecastDay as XMLElement
Dim xe_FiveDayForecastDayDetails as XMLElement

3. Set your elements by doing the following

xe_CurrentConditions =
myXMLDoc.SelectSingleNode("/weatherFeed/CurrentConditions") ' The

string
in the function is an xpath expression

' this is extremely important to get familiar with when working with

' xml documents ALSO XML and XPath ARE CASE SENSTIVE AS WELL
4. You can cycle through your xe_CurrentConditions by using the following loop

For Each xe_CurrentConditionsChild in xe_CurrentConditions.childNodes
Dim strThisElementName as String
Dim strThisElementValue as String

strThisElementName = xe_CurrentConditionsChild.Name ' Should yield country this 1st time thru your loop
strThisElementValue = xe_CurrentConditionsChild.InnerText ' Should Albania 1st time thru
Next

5. You can cycle through your FiveDayForecast by doing the same thing by
using a nested For Each and getting your

xe_FiveDayForecast =

myXMLDoc.SelectSingleNode("weatherFeed/CurrentConditions/fiveDayForecast")
For Each xe_FiveDayForecastDay in xe_xe_FiveDayForecast.ChildNodes
' the elemnt name of xe_FiveDayForecastDay will be Day1 the

first
time thru, Day2 the 2nd time thru...
For Each xe_FiveDayForecastDayDetails in
xe_FiveDayForecastDay.ChildNodes
Dim strThisElementName as String
Dim strThisElementValue as String

' This will let you cycle through each <day>
<highCelius><lowCelius> elements You can use them as you see fit.
strThisElementName = xe_CurrentConditionsChild.Name '
element name is
strThisElementValue = xe_CurrentConditionsChild.InnerText
Next
Next

I hope this helps.

Larry R

"Paul M" <mi******@hotmail.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
hi there,

i have an xml file, but am not too sure how to read all these elements

using
vb.net code.

any help would be greatly appreciated:))
<---------CODE--------------->

<?xml version="1.0" encoding="utf-8"?>
<weatherFeed>
<CurrentConditions>
<country>Albania</country>
<city>Tirana</city>
<weatherImageURL>cloudy.gif</weatherImageURL>
<celcius>14°C</celcius>
<farenheit>57°F</farenheit>
<description>Partly Cloudy</description>
<relativeHumidity>61%</relativeHumidity>
<wind>WSW at 10 mph (16 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>4:36 PM</sunset>
<barometricPressure>26.1Hg (F)</barometricPressure>
<lastUpdated>15/01/2004 13:21:14</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Thursday</day>
<highCelcius>14°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>58°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day1>
<Day2>
<day>Friday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>34°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day2>
<Day3>
<day>Saturday</day>
<highCelcius>11°C</highCelcius>
<lowCelcius>1°C</lowCelcius>
<highFarenheit>51°F</highFarenheit>
<lowFarenheit>33°F</lowFarenheit>
<imageURL>cloudy.gif</imageURL>
</Day3>
<Day4>
<day>Sunday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-1°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>31°F</lowFarenheit>
<imageURL>rain.gif</imageURL>
</Day4>
<Day5>
<day>Monday</day>
<highCelcius>9°C</highCelcius>
<lowCelcius>-4°C</lowCelcius>
<highFarenheit>49°F</highFarenheit>
<lowFarenheit>24°F</lowFarenheit>
<imageURL>snow.gif</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
</weatherFeed>
<---------CODE--------------->

thanks in advance,
PM



Nov 12 '05 #5
Larry,

i've added the external loop to loop through the cities in the XML file, and
in one example, it finds the nine cities but it displays the first one nine
times. I'm sure its something minor but i just cant seem to figure it out.

here is the XML, and source code below:

--------------------XML---------------------
<?xml version="1.0" encoding="utf-8"?>
<weatherFeed>
<!--Current Weather Conditions - taken from CNN.com Weather website.
(16/01/2004 12:43:26)-->
<CurrentConditions>
<!--URL: http://weather.cnn.com/weather/forecast.jsp?locCode=TNCA-->
<country>Aruba</country>
<city>Oranjestad</city>

<weatherImageURL>http://i.cnn.net/cnn/.element/img/1..../lrg/partly.su
nny.gif</weatherImageURL>
<celcius>25°C</celcius>
<farenheit>77°F</farenheit>
<description>Partly Sunny</description>
<relativeHumidity>88%</relativeHumidity>
<wind>E at 2 mph (3 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>6:34 PM</sunset>
<barometricPressure>29.89Hg (F)</barometricPressure>
<lastUpdated>16/01/2004 12:43:38</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Friday</day>
<highCelcius>30°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>86°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1.0/weather/med/showers.gif</ima
geURL>
</Day1>
<Day2>
<day>Saturday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day2>
<Day3>
<day>Sunday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day3>
<Day4>
<day>Monday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>76°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day4>
<Day5>
<day>Tuesday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
<CurrentConditions>
<!--URL: http://weather.cnn.com/weather/forecast.jsp?locCode=NUSN-->
<country>Aruba</country>
<city>St. Nicolaas</city>

<weatherImageURL>http://i.cnn.net/cnn/.element/img/1..../lrg/partly.su
nny.gif</weatherImageURL>
<celcius>25°C</celcius>
<farenheit>77°F</farenheit>
<description>Partly Sunny</description>
<relativeHumidity>88%</relativeHumidity>
<wind>E at 2 mph (3 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>6:34 PM</sunset>
<barometricPressure>29.89Hg (F)</barometricPressure>
<lastUpdated>16/01/2004 12:44:10</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Friday</day>
<highCelcius>30°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>86°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1.0/weather/med/showers.gif</ima
geURL>
</Day1>
<Day2>
<day>Saturday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day2>
<Day3>
<day>Sunday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day3>
<Day4>
<day>Monday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>76°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day4>
<Day5>
<day>Tuesday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
</weatherFeed>

----------------SOURCE CODE-----------------
Dim xDoc As New XmlDocument
Dim xe_weatherFeed As XmlElement
Dim xe_city As XmlNode
Dim xe_currentConditions As XmlElement
Dim xe_currentConditionsChild As XmlNode
Dim xe_fiveDayForecast As XmlElement
Dim xe_fiveDayForecastDay As XmlElement
Dim xe_fiveDayForecastDayDetails As XmlNode

Try
Dim a() As String
Dim al As New ArrayList
Dim i As Integer

xDoc.Load(strBaseURL & "weather/" &
Request.QueryString("countryID") & ".xml")
xe_weatherFeed = xDoc.SelectSingleNode("/weatherFeed")
xe_city = xDoc.SelectSingleNode("/weatherFeed/city")
xe_currentConditions =
xDoc.SelectSingleNode("/weatherFeed/city/currentConditions")
xe_fiveDayForecast =
xDoc.SelectSingleNode("/weatherFeed/city/fiveDayForecast")

For Each xe_city In xe_weatherFeed.ChildNodes
If xe_city.NodeType = XmlNodeType.Element Then
ReDim Preserve a(41)
i = 0
For Each xe_currentConditionsChild In
xe_currentConditions.ChildNodes
If xe_currentConditionsChild.NodeType =
XmlNodeType.Element Then
a(i) = xe_currentConditionsChild.InnerText
i += 1
End If
Next

For Each xe_fiveDayForecastDay In xe_fiveDayForecast
For Each xe_fiveDayForecastDayDetails In
xe_fiveDayForecastDay
If xe_fiveDayForecastDayDetails.NodeType =
XmlNodeType.Element Then
a(i) =
xe_fiveDayForecastDayDetails.InnerText
i += 1
End If
Next
Next
al.Add(a)
End If
Next
weatherRepeater.DataSource = al
weatherRepeater.DataBind()
Catch err As Exception
Response.Write("<br><font color=red><b>" & err.Message &
"</b></font>")
Finally
xDoc = Nothing
End Try

thanks again for your help.

regards,
Paul.

"Larry Rubin" <ru****@aeltus.com> wrote in message
news:u0**************@tk2msftngp13.phx.gbl...
Paul, I'm glad the example will be of help to you.

In the case of the <CurrentConditions> tag appearing multiple times, you
would establish a For Each loop on a xe_WeatherFeed element.

For example, xe_WeatherFeed = myXMLDoc.SelectSingleNode("/weatherFeed")

' This loop would be the outermost loop in the code example below.
For Each xe_CurrentCondition in xeWeatherFeed.ChildNodes

' The 1st time through would be for your first city, the 2nd time
through would be your 2nd city... etc.

Next

Larry R

"Paul M" <mi******@hotmail.com> wrote in message
news:eX**************@TK2MSFTNGP10.phx.gbl...
actually, just one more thing.

the CurrentConditions tag, may appear multiple times depending on how many
cities there are for that country.
Is this also easy to implement?

thanks again for your valuable help.

Paul.

"Larry Rubin" <ru****@aeltus.com> wrote in message
news:eA**************@TK2MSFTNGP11.phx.gbl...
Hi Paul,

The following is one way (of many ways) you can get at the elements in

your
document. I find this way easy to follow and I'm sure there are more
elegant ways of accomplishing the same end result.

1. You can use the xmldocument class to load in your xml document.

This class exists in system in the system.xml namespace.
e.g. Dim myXMLDoc as new xmldocument()

Try
myXMLDoc.load(<path and filename of your xml document>

Catch
....

2. Declare the following xmlelement types
Dim xe_CurrentConditions as XMLElement
Dim xe_CurrentConditionsChild As XMLElement
Dim xe_FiveDayForecast as XMLElement
Dim xe_FiveDayForecastDay as XMLElement
Dim xe_FiveDayForecastDayDetails as XMLElement

3. Set your elements by doing the following

xe_CurrentConditions =
myXMLDoc.SelectSingleNode("/weatherFeed/CurrentConditions") ' The

string
in the function is an xpath expression

' this is extremely important to get familiar with when working with

' xml documents ALSO XML and XPath ARE CASE SENSTIVE AS WELL
4. You can cycle through your xe_CurrentConditions by using the following loop

For Each xe_CurrentConditionsChild in xe_CurrentConditions.childNodes
Dim strThisElementName as String
Dim strThisElementValue as String

strThisElementName = xe_CurrentConditionsChild.Name ' Should yield country this 1st time thru your loop
strThisElementValue = xe_CurrentConditionsChild.InnerText ' Should Albania 1st time thru
Next

5. You can cycle through your FiveDayForecast by doing the same thing by
using a nested For Each and getting your

xe_FiveDayForecast =

myXMLDoc.SelectSingleNode("weatherFeed/CurrentConditions/fiveDayForecast")
For Each xe_FiveDayForecastDay in xe_xe_FiveDayForecast.ChildNodes
' the elemnt name of xe_FiveDayForecastDay will be Day1 the

first
time thru, Day2 the 2nd time thru...
For Each xe_FiveDayForecastDayDetails in
xe_FiveDayForecastDay.ChildNodes
Dim strThisElementName as String
Dim strThisElementValue as String

' This will let you cycle through each <day>
<highCelius><lowCelius> elements You can use them as you see fit.
strThisElementName = xe_CurrentConditionsChild.Name '
element name is
strThisElementValue = xe_CurrentConditionsChild.InnerText
Next
Next

I hope this helps.

Larry R

"Paul M" <mi******@hotmail.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
> hi there,
>
> i have an xml file, but am not too sure how to read all these elements using
> vb.net code.
>
> any help would be greatly appreciated:))
> <---------CODE--------------->
>
> <?xml version="1.0" encoding="utf-8"?>
> <weatherFeed>
> <CurrentConditions>
> <country>Albania</country>
> <city>Tirana</city>
> <weatherImageURL>cloudy.gif</weatherImageURL>
> <celcius>14°C</celcius>
> <farenheit>57°F</farenheit>
> <description>Partly Cloudy</description>
> <relativeHumidity>61%</relativeHumidity>
> <wind>WSW at 10 mph (16 km/h)</wind>
> <sunrise>7:05 AM</sunrise>
> <sunset>4:36 PM</sunset>
> <barometricPressure>26.1Hg (F)</barometricPressure>
> <lastUpdated>15/01/2004 13:21:14</lastUpdated>
> <!--5 Day Weather Forecast-->
> <fiveDayForecast>
> <Day1>
> <day>Thursday</day>
> <highCelcius>14°C</highCelcius>
> <lowCelcius>1°C</lowCelcius>
> <highFarenheit>58°F</highFarenheit>
> <lowFarenheit>33°F</lowFarenheit>
> <imageURL>cloudy.gif</imageURL>
> </Day1>
> <Day2>
> <day>Friday</day>
> <highCelcius>11°C</highCelcius>
> <lowCelcius>1°C</lowCelcius>
> <highFarenheit>51°F</highFarenheit>
> <lowFarenheit>34°F</lowFarenheit>
> <imageURL>cloudy.gif</imageURL>
> </Day2>
> <Day3>
> <day>Saturday</day>
> <highCelcius>11°C</highCelcius>
> <lowCelcius>1°C</lowCelcius>
> <highFarenheit>51°F</highFarenheit>
> <lowFarenheit>33°F</lowFarenheit>
> <imageURL>cloudy.gif</imageURL>
> </Day3>
> <Day4>
> <day>Sunday</day>
> <highCelcius>9°C</highCelcius>
> <lowCelcius>-1°C</lowCelcius>
> <highFarenheit>49°F</highFarenheit>
> <lowFarenheit>31°F</lowFarenheit>
> <imageURL>rain.gif</imageURL>
> </Day4>
> <Day5>
> <day>Monday</day>
> <highCelcius>9°C</highCelcius>
> <lowCelcius>-4°C</lowCelcius>
> <highFarenheit>49°F</highFarenheit>
> <lowFarenheit>24°F</lowFarenheit>
> <imageURL>snow.gif</imageURL>
> </Day5>
> </fiveDayForecast>
> </CurrentConditions>
> </weatherFeed>
> <---------CODE--------------->
>
> thanks in advance,
> PM
>
>



Nov 12 '05 #6
xe_currentConditions =
xDoc.SelectSingleNode("/weatherFeed/city/currentConditions")

is your problem, you need to create a NodeList for the list of
conditions, then you For Each through the NodeList, extracting every
XmlNode.

xnl_currentConditions =
xDoc.SelectNode("/weatherFeed/city/currentConditions")
foreach (XmlElement xe_condition in xnl_currentConditions)
{
// do stuff here
}
Paul M wrote:
Larry,

i've added the external loop to loop through the cities in the XML file, and
in one example, it finds the nine cities but it displays the first one nine
times. I'm sure its something minor but i just cant seem to figure it out.

here is the XML, and source code below:

--------------------XML---------------------
<?xml version="1.0" encoding="utf-8"?>
<weatherFeed>
<!--Current Weather Conditions - taken from CNN.com Weather website.
(16/01/2004 12:43:26)-->
<CurrentConditions>
<!--URL: http://weather.cnn.com/weather/forecast.jsp?locCode=TNCA-->
<country>Aruba</country>
<city>Oranjestad</city>

<weatherImageURL>http://i.cnn.net/cnn/.element/img/1..../lrg/partly.su
nny.gif</weatherImageURL>
<celcius>25°C</celcius>
<farenheit>77°F</farenheit>
<description>Partly Sunny</description>
<relativeHumidity>88%</relativeHumidity>
<wind>E at 2 mph (3 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>6:34 PM</sunset>
<barometricPressure>29.89Hg (F)</barometricPressure>
<lastUpdated>16/01/2004 12:43:38</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Friday</day>
<highCelcius>30°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>86°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1.0/weather/med/showers.gif</ima
geURL>
</Day1>
<Day2>
<day>Saturday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day2>
<Day3>
<day>Sunday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day3>
<Day4>
<day>Monday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>76°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day4>
<Day5>
<day>Tuesday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
<CurrentConditions>
<!--URL: http://weather.cnn.com/weather/forecast.jsp?locCode=NUSN-->
<country>Aruba</country>
<city>St. Nicolaas</city>

<weatherImageURL>http://i.cnn.net/cnn/.element/img/1..../lrg/partly.su
nny.gif</weatherImageURL>
<celcius>25°C</celcius>
<farenheit>77°F</farenheit>
<description>Partly Sunny</description>
<relativeHumidity>88%</relativeHumidity>
<wind>E at 2 mph (3 km/h)</wind>
<sunrise>7:05 AM</sunrise>
<sunset>6:34 PM</sunset>
<barometricPressure>29.89Hg (F)</barometricPressure>
<lastUpdated>16/01/2004 12:44:10</lastUpdated>
<!--5 Day Weather Forecast-->
<fiveDayForecast>
<Day1>
<day>Friday</day>
<highCelcius>30°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>86°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1.0/weather/med/showers.gif</ima
geURL>
</Day1>
<Day2>
<day>Saturday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day2>
<Day3>
<day>Sunday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day3>
<Day4>
<day>Monday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>76°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day4>
<Day5>
<day>Tuesday</day>
<highCelcius>29°C</highCelcius>
<lowCelcius>24°C</lowCelcius>
<highFarenheit>85°F</highFarenheit>
<lowFarenheit>75°F</lowFarenheit>

<imageURL>http://i.cnn.net/cnn/.element/img/1....rtly.cloudy.gi
f</imageURL>
</Day5>
</fiveDayForecast>
</CurrentConditions>
</weatherFeed>

----------------SOURCE CODE-----------------
Dim xDoc As New XmlDocument
Dim xe_weatherFeed As XmlElement
Dim xe_city As XmlNode
Dim xe_currentConditions As XmlElement
Dim xe_currentConditionsChild As XmlNode
Dim xe_fiveDayForecast As XmlElement
Dim xe_fiveDayForecastDay As XmlElement
Dim xe_fiveDayForecastDayDetails As XmlNode

Try
Dim a() As String
Dim al As New ArrayList
Dim i As Integer

xDoc.Load(strBaseURL & "weather/" &
Request.QueryString("countryID") & ".xml")
xe_weatherFeed = xDoc.SelectSingleNode("/weatherFeed")
xe_city = xDoc.SelectSingleNode("/weatherFeed/city")
xe_currentConditions =
xDoc.SelectSingleNode("/weatherFeed/city/currentConditions")
xe_fiveDayForecast =
xDoc.SelectSingleNode("/weatherFeed/city/fiveDayForecast")

For Each xe_city In xe_weatherFeed.ChildNodes
If xe_city.NodeType = XmlNodeType.Element Then
ReDim Preserve a(41)
i = 0
For Each xe_currentConditionsChild In
xe_currentConditions.ChildNodes
If xe_currentConditionsChild.NodeType =
XmlNodeType.Element Then
a(i) = xe_currentConditionsChild.InnerText
i += 1
End If
Next

For Each xe_fiveDayForecastDay In xe_fiveDayForecast
For Each xe_fiveDayForecastDayDetails In
xe_fiveDayForecastDay
If xe_fiveDayForecastDayDetails.NodeType =
XmlNodeType.Element Then
a(i) =
xe_fiveDayForecastDayDetails.InnerText
i += 1
End If
Next
Next
al.Add(a)
End If
Next
weatherRepeater.DataSource = al
weatherRepeater.DataBind()
Catch err As Exception
Response.Write("<br><font color=red><b>" & err.Message &
"</b></font>")
Finally
xDoc = Nothing
End Try

thanks again for your help.

regards,
Paul.

"Larry Rubin" <ru****@aeltus.com> wrote in message
news:u0**************@tk2msftngp13.phx.gbl...


Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Raghu Gupta | last post by:
Hi, Actually i am facing some problem using quickbooks and presently i am not so expert in using it. I am using c# code to retrive the data from quickbooks. it doesn't matter which language we...
1
by: René Paschold | last post by:
Hello, i write a xml file with following code: Dim xWriter As New XmlTextWriter(SaveFileContent.FileName, _ Encoding.UTF8) With xWriter .Formatting = Formatting.Indented
9
by: B-Dog | last post by:
I'm trying to read two nodes in an xml file that I'm using to store setting but I'm having a hard time trying to read the values of two nodes. Below I can read one node but I need to be able to...
4
by: Pim75 | last post by:
Hello, I have to read a XML file in ASP and save the values in a database. I can get this work, but I cannot read some nested nodes of the xml file. This is a part of the XML file: ...
4
by: Gerrit | last post by:
It must be simple, but I don't find how I can read a XmlFile in an ArrayList. Sample of my XmlFile: <?xml version="1.0" encoding="utf-8" ?> <Relations> <Person> <FirstName>John</FirstName>...
3
by: Alan T | last post by:
This is my xml file content: <?xml version="1.0"?> <server> <mssqlChicago> <host>www.chicagoserver.com</host> <user>managerA</user> <password>ceoman</password> <db>dbCEO</db> </mssqlChicago>
6
by: | last post by:
Hi, I'm steel trying to read and update my XML file with Visual Basic Express but i am unable to find the right way to read my xml file and update it if neccessary... Here is my problem :...
0
by: Kavitha Sudhershan | last post by:
hi, i wanna read the node values from xml. As per my code i can read the node values in first child node and for the next node am not able to read the node values. pls help me. i'll paste the code...
6
by: =?Utf-8?B?VGFtbXkgTmVqYWRpYW4=?= | last post by:
Hi, can someone please let me know how I can read xml elements using object oriented program. I created a class to use the get and set properties however I dont know how I can pass the values from...
12
by: blackirish | last post by:
Hi all, I am trying to merge 2 XML files that first of all i need to compare nodes of both files according to 2 attributes in the nodes. If those 3 attributes are equal, i need to replace the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.