Examples of Extracting a Document Attribute Using an XQL Query
The examples provided are based on the following EDI document:
ST*850*0001!
BEG*01*BK*99AKDF9DAL393*39483920193843*20021106*AN3920943*AC*IBM*02*AE*02*BA!
CUR*AC*USA*.2939*SE*USA*IMF*002*20021106*1615*021*20021106*0718*038*20021106*195
2*002*20021106*1615*021*20021106*0718!
REF*AB*3920394930203*GENERAL
PURPOSE*BT:12345678900987654321768958473:CM:500:AB:3920394930203!
REF*BC*3920394930203*GENERAL
PURPOSE*BT:12345678900987654321768958473:CM:500:AB:3920394930203!
...
SE*196*0001!
Example 1. To extract the first field, 01, in the BEG record of the sample EDI document, specify the following XQL query: /ST/BEG/BEG01/code
Example 2. To extract the first field, AB, in the first REF record of the sample EDI document, specify the following XQL query: /ST/REF[0]/REF01/code
Example 3. To extract the first field, BC, in the second REF record of the sample EDI document, specify the following XQL query: /ST/REF[1]/REF01/code