><?xml version="1.0" encoding="Windows-1255" standalone="yes"?> ><DOCUMENT> > <ROW> > <PatientID Type="N">1</PatientID> > <PatientName Type="C">Jaime</PatientName> > <SH Type="L">0</SH> > <Address Type="C">My Address</Address> > <City Type="C">Karkur/City> > <Zip Type="C">37512</Zip> > <HomePhone Type="C">037951010</HomePhone> > <Cell Type="C">0521234567</Cell> > <Birth Type="D">1973-02-22</Birth> > <VIP Type="N">0</VIP> > </ROW> ></DOCUMENT> >
**ParseAlphaAnywhere.prg **If your file is not too large, StrExtract() is very good at parsing xml lcContent = FileToStr("AlphaAnywhere.xml") lnRows = OCCURS([<ROW>],lcContent) FOR i = 1 TO lnRows && parse each field as a string lcRow = StrExtract(lcContent,[<ROW>],[</ROW>],i) m.PatientID = STREXTRACT(lcRow,[<PatientID Type="N">],[</PatientID>]) m.PatientName = STREXTRACT(lcRow,[<PatientName Type="C">],[</PatientName>]) m.SH = STREXTRACT(lcRow,[<SH Type="L">],[</SH>]) && etc etc for all fields && then convert the fields from strings into correct types m.PatientID = INT(VAL(m.PatientID)) m.SH = IIF(m.SH = [0],.F.,.T.) INSERT INTO MyTable FROM memvar ENDFOR