vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Top-Preis! AP-Access-Tools-CD Volume 1  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
Vb.net XML XDocument 
Autor: Frank
Datum: 02.04.15 10:37

Hallo,

ich habe folgendes Problem und hoffe Ihr könnt mir helfen.

Folgendes XML Versuche ich einzulesen:
======================================

<?xml version="1.0" encoding="iso-8859-1" ?>
<TbmXmlResponse ver="1.0" usr="" typ="" enc=" len="1128" rip="" sid=" 01.04.2015 04:11:20 PM(180/2/42968)" svr="tbm14" lng="de" >
<admin typ="through" sub="" opt="" bkc="" bmc="" sts="" ind="" rem="" rtc="1" bsc="OK" >
<login usr="" agn="" ptr="" prd="no" />
<result cur="EUR" ttp="" ppm="" mid="998" txt="" ctp="" use="0"/>
<operator act="I" knd="" toc="slr" psn="2" pgc="0" mfz="" agt="" prc="" pr2="" clt="" exp="" mst="ec=1;mc=1;kx=;" bst="041379001542" opd="" />
<customer anr="" sur="" pre="" str="" zip="" cty="" add="" tel="" tlf="" csn="" rmk="" />
<info itc="10" >
<line id="1" ></line>
<line id="2" >ALLE AKTUELLEN INFORMATIONEN, TIPPS & TRICKS FINDEN SIE UNTER WWW.SLR-INFO.DE</line>
<line id="3" ></line>
<line id="4" ></line>
<line id="5" ></line>
<line id="6" >10 *** KONTAKT ZU SCHAUINSLAND-REISEN DUISBURG</line>
<line id="7" >11 *** AUSLANDSZAHLUNGEN/ZAHLUNGEN/KREDITKARTENZAHLUNGEN</line>
<line id="8" >12 *** SLRD</line>
<line id="9" >13 *** ZUG ZUM FLUG</line>
<line id="10" >UMS *** UMSATZSTATISTIK</line>
</info>
<attachment cny="" eml="" fax="" mob="" csn="" ast="" arm="" anm="" ink="0" ema="0" faa="0" moa="0"/>
</admin>
</TbmXmlResponse>

Funktioniert auch soweit mit meinem Code
  Dim xml As XDocument = XDocument.Load("temp.xml")
 
        For Each Veranstalter As XElement In xml...<operator>
            Me.txtAktion.Text = Veranstalter.Attribute("act")
            Me.txtReiseart.Text = Veranstalter.Attribute("knd")
            Me.txtVeranstalter.Text = Veranstalter.Attribute("toc")
            Me.txtPersonen.Text = Veranstalter.Attribute("psn")
 
            Me.txtFunkionszeile.Text = Veranstalter.Attribute("mfz")
            Me.txtAGTNR.Text = Veranstalter.Attribute("agt")
            Me.txtVorgang.Text = Veranstalter.Attribute("prc")
            Me.txtVorgangsolgenummer.Text = Veranstalter.Attribute("pr2")
            Me.txtBerater.Text = Veranstalter.Attribute("clt")
            Me.txtEXP.Text = Veranstalter.Attribute("exp")
        Next
 
        For Each Kunde As XElement In xml...<customer>
            Me.txtKundenNr.Text = Kunde.Attribute("csn")
            Me.txtNachname.Text = Kunde.Attribute("sur")
            Me.txtVorname.Text = Kunde.Attribute("pre")
            Me.txtStrasse.Text = Kunde.Attribute("str")
            Me.txtPLZ.Text = Kunde.Attribute("zip")
            Me.txtOrt.Text = Kunde.Attribute("cty")
            Me.txtLanderCode.Text = Kunde.Attribute("cny")
            Me.txtEMail.Text = Kunde.Attribute("eml")
            Me.txtTelefon.Text = Kunde.Attribute("tel")
            Me.txtTLF.Text = Kunde.Attribute("tlf")
            Me.txtFax.Text = Kunde.Attribute("fax")
            Me.txtMobil.Text = Kunde.Attribute("mob")
            Me.txtZusatz.Text = Kunde.Attribute("add")
        Next
Nur wie bekomme ich den Text aus den Info Zeilen Line ID 1-10 heraus?

<info itc="10" >
<line id="1" ></line>
<line id="2" >ALLE AKTUELLEN INFORMATIONEN, TIPPS & TRICKS FINDEN SIE UNTER _
  WWW.SLR-INFO.DE</line>
<line id="3" ></line>
<line id="4" ></line>
<line id="5" ></line>
<line id="6" >10         *** KONTAKT ZU SCHAUINSLAND-REISEN DUISBURG</line>
<line id="7" >11         *** _
  AUSLANDSZAHLUNGEN/ZAHLUNGEN/KREDITKARTENZAHLUNGEN</line>
<line id="8" >12         *** SLRD</line>
<line id="9" >13         *** ZUG ZUM FLUG</line>
<line id="10" >UMS        *** UMSATZSTATISTIK</line>
</info>
Vielen Dank.

Frank

alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Vb.net XML XDocument1.648Frank02.04.15 10:37
Re: Vb.net XML XDocument868Kuno6002.04.15 14:34

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel