xmlns="http://ns.adobe.com/xfdf/"
out of the xml<?xml version="1.0" encoding="UTF-8"?> <xfdf xml:space="preserve" ><f href="nys2025.pdf" /><ids original="4D56C4005EEE204CBB336870670AE698" modified="39E5C241305FD74EB99F77919F7D3C74" /><fields ><field name="ADDRESS" ><value >1 XFDF STREET FAIRFIELD, NJ 07004</value ></field ><field name="AGENT ID NUMBER" ><value >123</value ></field ><field name="CONTACT PERSON" ><value >DEB</value ></field ><field name="Check Box13" ><value >Yes</value ></field ><field name="NAME OF TRANSMIT" ><value >OCS</value ></field ><field name="Quarter" ><value >1</value ></field ><field name="Text10" ><value >973</value ></field ><field name="Text11" ><value >882</value ></field ><field name="Text12" ><value >6882</value ></field ><field name="Text24" ><value >1</value ></field ><field name="Text30" ><value >12-3333333</value ></field ><field name="Year" ><value >2008</value ></field ><field name="amt of wt rem" ><value >666.</value ></field ><field name="amt ui rem" ><value >555</value ></field ><field name="num of 5 rec" ><value >5</value ></field ><field name="num of 6 rec" ><value >6</value ></field ><field name="numb of 7 rec" ><value >7</value ></field ><field name="numb of cks" ><value >1</value ></field ></fields ></xfdf >I can get most of the data out, except the Ids (original and modified)
#define TRUE .t. #define FALSE .f. function do_it() local xmlFileName xmlFileName = 'd:\tmp\xx\xx.xml' && where the xml file is local Obj, i, TableObj Obj = createobject('xmlAdapter') obj.PreserveWhiteSpace = TRUE obj.XMLNameIsXPath = TRUE ?m.Obj.LoadXml(m.xmlFileName, TRUE, TRUE) && this is the 'f' create cursor aa ; ( href V(32) ; ) obj.AddTableSchema('aa', FALSE, strconv('f', 12)) obj.Tables(m.obj.Tables.Count).Fields(1).IsAttribute = TRUE create cursor Ids ; ( original V(32), ; modified V(32) ; ) obj.AddTableSchema('Ids', FALSE, strconv('Ids', 12)) obj.Tables(m.obj.Tables.Count).Fields(1).IsAttribute = TRUE obj.Tables(m.obj.Tables.Count).Fields(2).IsAttribute = TRUE create cursor fields; ( dummy V(10) ; ) obj.AddTableSchema('fields', TRUE, strconv('fields', 12)) create cursor field ; ( name V(32), ; value V(128) ; ) obj.AddTableSchema('field', TRUE, strconv('field', 12)) obj.Tables(m.obj.Tables.Count).Fields(1).IsAttribute = TRUE =m.obj.Tables(m.obj.Tables.Count-1).Nest(m.obj.Tables(m.obj.Tables.Count)) for i = 1 to m.obj.Tables.Count with m.obj.Tables[m.i] =.ToCursor(TRUE) endwith endfor * assert FALSE endfunc *---------------------------------------------------------------------------