next up previous contents
Next: Approximate string Search Up: Exact string Search Previous: Searching for Strings

   
Searching with SGML Tags

In recent years, the ISO-SGML (Standardized Generalized Markup Language) tagging convention has begun to be used extensively, most notably with HTML and the World Wide Web [21]. An SGML tag surrounds a body of information with an opening and closing label. The opening label is of the form <lbl> and the closing label is of the form </lbl> where the type label lbl can be almost any sequence of symbols. SGML is extremely flexible since it allows for an infinite number of different labels, it allows for an arbitrary depth of nested tags, it is relatively economical in terms of storage, and, because of the angle brackets < and >, it easy to recognize the beginning and end of a body of information. For these reasons, the ISO-SGML tagging convention was chosen for use in the Darwin genetic database structure.

The SearchTag function searches an item of type string for an opening and closing SGML tag and returns the information contained between them. The general syntax is
SearchTag(taglabel, target)
where taglabel is an SGML type label and target is an arbitrary name.

> SearchTag('AC', 
>           '<ID>11S3_HELAN</ID><AC>P19084;</AC><DE>GLOBULIN</DE>');
P19084;

We examine a number of related routines in Chapter [*] - Genetic Databases.


next up previous contents
Next: Approximate string Search Up: Exact string Search Previous: Searching for Strings
Gaston Gonnet
1998-09-15