Retrieving XML Metadata by Using a URL Path
To retrieve records in XML format, append a path to the URL for the XML Server that describes the records you want to retrieve. For example:
http://library.university.com/xmlopac/acrane
This returns all bibliographic records where the author (the a-tagged field) equals crane.
URL Path Elements
The elements that can be appended to the path and their definitions are listed in the table below. Each element must be separated from the others by a forward slash (/). Each element must be preceded by the elements that precede it in the table.
URL Path Element Number | Definition | Example | Example Retrieves |
---|---|---|---|
1 | The field index tag and the target data in the tagged field. | tgone+with+the+wind | records with "gone with the wind" in the t-tagged field. |
2 | A positive or negative number denoting that retrieved results should not start from the first indexed entry but from an entry after or before the first one. | 12 | results starting at the twelfth indexed entry after the first entry. |
-3 | results starting at the third indexed entry before the first entry. | ||
3 | A positive number denoting the number of indexed entries to retrieve. The default is 12. | 17 | a maximum of 17 indexed entries. |
4 | A positive number denoting that retrieved titles should start from the first title but from a title after the first one. This path element is ignored if more than one indexed entry has been specified. |
3 | results starting with the third title of each specified indexed entry. |
5 | A positive number denoting the number of titles to retrieve. This path element is ignored if more than one indexed entry has been specified. |
4 | a maximum of 4 titles from each specified indexed entry. |
Examples
Some examples of URLs and paths, with an explanation of the records retrieved are:
Example 1
http://library.university.edu/xmlopac/asmith/2
This request retrieves records where author equals "smith," beginning at the second index group of the WebPAC page. Here is the WebPAC page:
And here is the result of a request to the same database, using the path /xmlopac/asmith/2:
Note that the XML Heading elements begin with the second index group "Smith 1945-".
Example 2
http://library.university.edu/xmlopac/tmoney/-3
This request retrieves results beginning with the third index group before the first entry for the title "money."
Example 3
http://library.university.edu/xmlopac/asmith/2/1/7/4
This request finds the second index entry for author "smith" (asmith/2) and returns—from that index entry only (asmith/2/1)—four titles, starting with the seventh (asmith/2/1/7/4). The URL path elements that limit title retrieval (7/4 in this example) are ignored if there is an insufficient number of titles to satisfy the request or if more than one indexed entry has been specified.