Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with xml
Message
De
13/02/2007 10:59:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
13/02/2007 10:30:25
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MySQL
Divers
Thread ID:
01194974
Message ID:
01195160
Vues:
18
This message has been marked as the solution to the initial question of the thread.
>Hello Cetin
>Thank you very much !!
>The only problem is, that the first line of the xmlfiles look like this:
>* = < !!!
>
>*?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
>
>without the first line everthing works !
>l_text = FILETOSTR("2003667070.xml")
>lcXML = ''+m.l_text+''
>XMLTOCURSOR(m.lcXML, 'myCursor')
>with the first line xmltocursor runs into an error:
>invalid xml declaration line 1 position 11
>
>Best regards
>Albert
TEXT TO lcOriginal noshow && this one is what you get
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<Auftrag>
  <ReferenznummerCB>2003667011</ReferenznummerCB>
  <DatumCB>01.12.2006 07:40:00</DatumCB>
  <CallAgentCB>orgaline</CallAgentCB>
  <MailCallAgent>orgaline@commerzbank.com</MailCallAgent>
  <FonCallAgent>+49 1802 224495</FonCallAgent>
  <Customer>Mras, Nicole</Customer>
  <MailCustomer>NICOLE.MRAS@Commerzbank.com</MailCustomer>
  <FonCustomer>+49 361 6787-651</FonCustomer>
  <IncidentStatus>Auftrag</IncidentStatus>
  <Incident>im kopierraum muesst bitte eine teppichreinigung durchgefuehrt werden.</Incident>
  <WE>1132</WE>
  <Anschrift>Juri-Gagarin-Ring 86, 99084 Erfurt</Anschrift>
  <Raum>eg</Raum>
  <Prioritaet>4</Prioritaet>
  <DatumPrio>08.12.2006 07:40:00</DatumPrio>
  <VIP>0</VIP>
</Auftrag>
ENDTEXT

* to VFP it's a single row, surround with a root - table
lcXML = STUFF(m.lcOriginal,ATC('?>',m.lcOriginal)+2,0,'<myData>')+'</myData>' 
XMLTOCURSOR(m.lcXML, 'myCursor')
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform