Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing non-table xml
Message
De
03/09/2009 12:51:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Divers
Thread ID:
01422447
Message ID:
01422463
Vues:
77
>I am working with Quickbooks XML integration, and I have a question about parsing a response. Here is an example of a response I am getting when an operation fails:
>
>
><?xml version="1.0" ?>
><QBXML>
>  <QBXMLMsgsRs>
>    <TimeTrackingAddRs statusCode="3310" statusSeverity="Error" statusMessage="... explanation of the error ...." />
>  </QBXMLMsgsRs>
></QBXML>
>
>
>Is there a way to parse this using XMLAdapter or some other tool, or do I just have to do it manually?

Paul,
If it is always like this then you don't even need XMLAdapter, you can use XMLToCursor. ie:
TEXT TO lcXML noshow
<?xml version="1.0" ?>
<QBXML>
  <QBXMLMsgsRs>
    <TimeTrackingAddRs statusCode="3310" statusSeverity="Error" statusMessage="... explanation of the error ...." />
  </QBXMLMsgsRs>
</QBXML>
ENDTEXT

XMLTOCURSOR(STREXTRACT(m.lcXML,'<QBXMLMsgsRs>','</QBXMLMsgsRs>',1,1+4),'myCursor')
browse
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
Répondre
Fil
Voir

Click here to load this message in the networking platform