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....



ScanStreamForXMLTag


Unit: SDL_streams
Class: none
Declaration: function ScanStreamForXMLTag (InStream: TStream; XMLTag: string; var Attrib, Contents: string; Feedback: TOnPercentDoneEvent): 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 procedure pointer Feedback allows to implement a callback routine in order to indicate the progress of the scan (set it to nil to suppress any feedback).

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: 2023-Jul-14