Class XML.Students [ Abstract ] { XData XMLData { } ClassMethod Output() As %Status { // get xml stream from the 'XData' block contained in this class and parse Set xdata=##class(%Dictionary.CompiledXData).%OpenId($this_"||XMLData",, .sc) If $$$ISERR(sc) Quit sc Set sc=##class(%XML.TextReader).ParseStream(xdata.Data, .hdlr) If $$$ISERR(sc) Quit sc // iterate through document, node by node While hdlr.Read() { If hdlr.Path="/Students/Student", hdlr.MoveToAttributeName("Name") { Write hdlr.Value, ! } } // finished Quit $$$OK } }