>> <datafield tag="020" ind1=" " ind2=" "> >> <subfield code="c">$19.95 ($31.00 Can.)</subfield> >> </datafield> >>>>We need the price information as in subfield code "c" and:
c020 = STREXTRACT(cXML, [<datafield tag="020"], [</datafield><subfield code="c">], [</subfield>])>>
>> <datafield tag="260" ind1=" " ind2=" "> >> <subfield code="a">San Francisco, CA :</subfield> >> <subfield code="b">Collins,</subfield> >> <subfield code="c">1995.</subfield> >> </datafield> >>>>We also need the data from Datafield tag "260" subfield "b" and "c".
c260 = STREXTRACT(cXML, [<datafield tag="260"], [</datafield><subfield code="b">], [</subfield>]) >c260c = STREXTRACT(c260, [<subfield code="c">], [</subfield>])You may find that techniques like this are faster than using a DOM. Also, note that VFP9 has added a new flag value of 4 on STREXTRACT() that will include the beginning and ending delimiters in the returned value -- making it easy to "lift out" entire sections of a larger XML document with surrounding tags intact, in case you need to break out parts of the XML into its own document for some reason.