Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using XMLTOCURSOR()
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Using XMLTOCURSOR()
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01554474
Message ID:
01554474
Vues:
72
Anyone can explain why I am getting a different result using the following expression:
cFileName = "test.xml"
XMLTOCURSOR(cFileName,"alias_name", 512)
The content of text.xml looks like following:
<DataBase>
 <ConnectionInfo>
  <DBKey>1</DBKey>
  <String>SQLNCLI10</String> 
  </ConnectionInfo>
 <ConnectionInfo>
  <DBKey>2</DBKey>
  <String>SQLNCLI10</String> 
  </ConnectionInfo>
</DataBase>
The above XML file produces a cursor with the column DBKey is number, 1 and 2. This is what I expect.

But if I have only one element ConnectionInfo as following:
<DataBase>
 <ConnectionInfo>
  <DBKey>1</DBKey>
  <String>SQLNCLI10</String> 
  </ConnectionInfo>
</DataBase>
Then the above test.xml produces a cursor where the column DBKey is .T.

Why? Could someone explain what I am missing?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform