Skip to main content

%CSP.TokenStream

Class %CSP.TokenStream Extends %RegisteredObject [ Not ProcedureBlock, System = 3 ]

A simple xml tokenizer. NOT FOR PUBLIC USE.

Properties

Tag

Property Tag As %String [ Internal ];

Last read Tag

ScriptTag

Property ScriptTag As %String [ Internal ];

Last read script tag

Text

Property Text As %String [ Internal ];

Text content of tag

Type

Property Type As %String [ Internal ];

Type of tag

LineNo

Property LineNo As %String [ Internal ];

Lien number

InputHandle

Property InputHandle As %String [ Internal, MultiDimensional, Private ];

Input handle for parse routine

TagParms

Property TagParms As %String [ Internal, MultiDimensional, Private ];

Information about last tag read

stream

Property stream As %GlobalCharacterStream [ Internal, Private ];

Stream that is being processed.

Methods

GetTag

Method GetTag() As %String [ CodeMode = expression, Internal ]

Returns a the current tag, if there is one, converted to upper-case.

IsTag

Method IsTag() As %Boolean [ CodeMode = expression, Internal ]

Returns TRUE (1) if the current token is a tag.

IsComment

Method IsComment() As %Boolean [ CodeMode = expression, Internal ]

Returns TRUE (1) if the current token is a comment.

IsText

Method IsText() As %Boolean [ CodeMode = expression, Internal ]

Returns TRUE (1) if the current token is text.

IsScript

Method IsScript() As %Boolean [ CodeMode = expression, Internal ]

Returns TRUE (1) if the current token is script.

QuoteHTML

ClassMethod QuoteHTML(text As %String) As %String [ Internal ]

Converts text to a quoted HTML string.

OpenFromFile

Method OpenFromFile(filename As %String) As %Status [ Internal ]

Read the items from a file and process the tags

OpenFromString

Method OpenFromString(string As %String) As %Status [ Internal ]

Read the items from a string and process the tags

OpenFromStream

Method OpenFromStream(stream As %CharacterStream) As %Status [ Internal ]

Read the items from a character stream and process the tags

NextToken

Method NextToken() As %Boolean [ Internal ]

Parse for next token

GetAttrs

Method GetAttrs(ByRef attrs As %String) [ Internal ]

Get attributes for current tag

%OnClose

Method %OnClose() As %Status [ Internal ]

Cleanup on instance close