%XML.CatalogParser
Class %XML.CatalogParser Extends %Library.RegisteredObject [ Not ProcedureBlock, System = 3 ]
An XML Catalog file parser.
This is used by the %XML.Catalog class.
Use as follows: Set parser = ##class(%XML.CatalogParser).%New() Set sc = parser.Start("\dbdtd\docbook.cat"),! While (parser.NextElement(.el)) { // el will contain the values for this element // as subscripts }
Properties
BPos
Property BPos As %Integer;
Buffer
Property Buffer As %String;
InStream
Property InStream As %AbstractStream;
LineNo
Property LineNo As %Integer;
ColNo
Property ColNo As %Integer;
LastColNo
Property LastColNo As %Integer;
AtEnd
Property AtEnd As %Boolean;
ErrorMsg
Property ErrorMsg As %String;
UndoBuffer
Property UndoBuffer As %String;
holds the last "undone" token
Methods
Start
Method Start(file As %String) As %Status
Begin parsing the given Catalog file
End
Method End()
NextElement
Method NextElement(ByRef element As %String) As %Boolean
Find and return the next element in the catalog
element returns the values of the element as subscripts.
Error
Method Error(text As %String)
Display an error message
UndoToken
Method UndoToken(token As %String)
Put back a token into the input stream
NextToken
Method NextToken() As %String
Return the next token from the InputStream