habe es jetzt folgenderma�en gel�st. glaube aber nicht dass dies der beste
weg ist!
was meint ihr?

gruss
pat

Dim strXMLPath As String =
"http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml";
  Dim objXMLReader As XmlTextReader
     objXMLReader = New XmlTextReader(strXMLPath)
     Dim objNodeType As XmlNodeType

     Do While objXMLReader.Read()
   If objXMLReader.AttributeCount > 0 And objXMLReader.Name = "Cube" Then

      Do While objXMLReader.MoveToNextAttribute()

     if objXMLReader.Name = "currency" and objXMLReader.Value="USD" then
      objXMLReader.MoveToNextAttribute()
      varUSD = objXMLReader.Value
     end if
     if objXMLReader.Name = "currency" and objXMLReader.Value="GBP" then
      objXMLReader.MoveToNextAttribute()
      varGBP = objXMLReader.Value
     end if
     if objXMLReader.Name = "currency" and objXMLReader.Value="CYP" then
      objXMLReader.MoveToNextAttribute()
      varCYP = objXMLReader.Value
     end if

    Loop

   End If
    Loop
    objXMLReader.Close()



----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 28, 2004 2:13 PM
Subject: [Asp.net] xml problem


hallo zusammen,

ich m�chte in folgendem xml dokument direkt auf den "rate" wert von cube
currency "USD" zugreifen. versuche dies auch �ber DOM getElementbytagname,
aber irgendwie funktioniert das nicht.

meine lekt�re und google gibt auch nicht viel mehr her. es scheint mir auch
als xml neuling dass das dok nicht so sehr wohlgeformt ist!? oder doch?

das xml dok:

  <?xml version="1.0" encoding="UTF-8" ?>
- <gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01";
xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref";>
  <gesmes:subject>Reference rates</gesmes:subject>
- <gesmes:Sender>
  <gesmes:name>European Central Bank</gesmes:name>
  </gesmes:Sender>
- <Cube>
- <Cube time="2004-05-27">
  <Cube currency="USD" rate="1.2165" />
  <Cube currency="JPY" rate="135.59" />
    </Cube>
  </Cube>
  </gesmes:Envelope>

mein versuch iin vb:

Dim strXMLPath As String =
"http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml";
 Dim objXMLDoc As New XMLDocument()
    objXMLDoc.Load(strXMLPath)

 Dim colElements As XmlNodeList
 colElements = objXMLDoc.GetElementsByTagname("Cube")
 Dim objNode As XmlNode
 Dim strResults As String
 For Each objNode in colElements
  strResults += objNode.FirstChild().Value & "<br>"
 Next

 outResults.innerHTML = strResults



wo liegt denn mein denkfehler, wo find ich mehr passenden infos?

gr�sse
pat


*************************
_______________________________________________
This ASP.NET email is sponsored by:
UDEX ProMenu.Net  - Die Software f�r Navigation - Jetzt kostenlos testen!
Tree- Style, Horizontal- Slide, Vertical- Slide. http://www.udexnet.com

_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net
*************************

*************************
_______________________________________________
This ASP.NET email is sponsored by:
UDEX ProMenu.Net  - Die Software f�r Navigation - Jetzt kostenlos testen!
Tree- Style, Horizontal- Slide, Vertical- Slide. http://www.udexnet.com

_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net
*************************

Antwort per Email an