File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -217,16 +217,17 @@ xml_source_1 = CSVDiff::XMLSource.new('My Label')
217
217
```
218
218
219
219
Next, we pass XML documents to this source, and specify XPath expressions for each
220
- row and column of data to produce:
220
+ row and column of data to produce via the ` process(rec_xpath, field_maps, options) `
221
+ method:
221
222
222
223
* An XPath expression is provided to select each node value in the document that
223
224
will represent a row. Taking an HTML table as an example of something we wanted
224
225
to parse, your rec_xpath value might be something like the following:
225
226
` '//table/tbody/tr' ` . This would locate all tables in the document, and create
226
227
a new row of data in the XMLSource every time a ` <tr> ` tag was encountered.
227
- * A hash of field_maps is then provided to describe how to generate columns values
228
+ * A hash of field_maps is then provided to describe how to generate column values
228
229
for each row of data. The keys to field_maps are the names of the fields to be
229
- output, while the values are the epression for how to generate value . Most
230
+ output, while the values are the epression for how to generate values . Most
230
231
commonly, this will be another XPath expression that is evaluated in the context
231
232
of the node returned by the row XPath expression. So continuing our HTML example,
232
233
we might use ` './td[0]/text()' ` as an expression to select the content of the
You can’t perform that action at this time.
0 commit comments