The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:function ScanStreamForXMLTag (InStream: TStream; XMLTag: string; var Attrib, Contents: string): integer;

The function ScanStreamForXMLTag scans the stream InStream for the XML tag XMLTag. The XML tag specification must not include the leading and trailing angle brackets ('<' and '>'), the search for the XML tag is not case sensitive. The scanning for the XML tag starts at the current position of the stream. On return the function delivers the attributes of the tag in the parameter Attrib and the entire text between the requested XML tag and its corresponding closing tag in the parameter Contents.

On return the position of the stream points to the first byte after the closing tag. The function returns one of the following error codes:

0 no error
-1 tag not found
-2 tag found, but closing tag missing



Last Update: 2012-Oct-20