Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML to tables?
Message
De
04/12/2007 14:24:07
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
 
 
À
04/12/2007 14:10:00
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Divers
Thread ID:
01273112
Message ID:
01273123
Vues:
17
I tried that - the problem is that my file has "sub-files." For example, within the "CLASS" section there are multiple "SEGMENTS." The XMLTOCURSOR ignores the sub-sections.

>If you get rid of that space before the '?' near the end of the first line and dump the dashes that begin some of the lines, you can use:
>
>
XMLTOCURSOR('xmlfile.xml',"xmlcursor",512+1024)
>
>
>>I haven't really worked with XML at all but now I need to get an XML file into VFP tables (and back). My XML file looks something like this (very simplified) - where do I start?
>>
>>
>><?xml version="1.0" encoding="windows-1252" ?>
>>   - <BATCH_FILE>
>>      - <CLASS>
>>           <ACTION>ADD</ACTION>
>>           <CLASS_CODE>ADY2107</CLASS_CODE>
>>           <CLASS_START_DATE>2006/01/19</CLASS_START_DATE>
>>           <CLASS_END_DATE>2006/06/15</CLASS_END_DATE>
>>           <CLASS_TYPE>NA</CLASS_TYPE>
>>           <LANGUAGE_TYPE>E</LANGUAGE_TYPE>
>>           <CLASSROOM_TYPE>1</CLASSROOM_TYPE>
>>         - <SEGMENT>
>>              <ACTION>ADD</ACTION>
>>              <MINISTRY_DFND_CRS>SBI3C</MINISTRY_DFND_CRS>
>>              <LOCAL_DEV_CRS />
>>              <CREDIT_VALUE>01.00</CREDIT_VALUE>
>>           </SEGMENT>
>>         - <SEGMENT>
>>              <ACTION>ADD</ACTION>
>>              <MINISTRY_DFND_CRS>SBI3U</MINISTRY_DFND_CRS>
>>              <LOCAL_DEV_CRS />
>>              <CREDIT_VALUE>01.00</CREDIT_VALUE>
>>           </SEGMENT>
>>      </CLASS>
>>    - <CLASS>
>>           <ACTION>ADD</ACTION>
>>           <CLASS_CODE>ADY2109</CLASS_CODE>
>>           <CLASS_START_DATE>2005/09/06</CLASS_START_DATE>
>>           <CLASS_END_DATE>2006/06/15</CLASS_END_DATE>
>>           <CLASS_TYPE>NA</CLASS_TYPE>
>>           <LANGUAGE_TYPE>E</LANGUAGE_TYPE>
>>           <CLASSROOM_TYPE>1</CLASSROOM_TYPE>
>>         - <SEGMENT>
>>              <ACTION>ADD</ACTION>
>>              <MINISTRY_DFND_CRS>SNC2D</MINISTRY_DFND_CRS>
>>              <LOCAL_DEV_CRS />
>>              <CREDIT_VALUE>01.00</CREDIT_VALUE>
>>           </SEGMENT>
>>         - <SEGMENT>
>>              <ACTION>ADD</ACTION>
>>              <MINISTRY_DFND_CRS>SNC2P</MINISTRY_DFND_CRS>
>>              <LOCAL_DEV_CRS />
>>              <CREDIT_VALUE>01.00</CREDIT_VALUE>
>>           </SEGMENT>
>>      </CLASS>
>>  </BATCH_FILE>
>>
Elyse Pomerantz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform