你是要遍历XML DOM树?可以如下使用:

ClassMethod Test()
{
    Set x="<?xml version=""1.0"" ?><root xmlns=""test"" xmlns:mc=""test1"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:schemaLocation=""test2""><!--this is a test--><id code=""test3""/></root>"

    try
    {

    $$$ThrowOnError(##class(%XML.XPATH.Document).CreateFromString(x, .doc))
    Set doc.PrefixMappings="s test"
    $$$ThrowOnError(doc.EvaluateExpression("/s:root", ".", .field))
    #dim obj As %XML.XPATH.DOMResult = field.GetAt(1)
    
    while obj.Read() 
    {
      if obj.HasValue 
      {
        write obj.Path,": ",obj.Value,!
      }
      if obj.HasAttributes
      {
          for i=1:1:obj.AttributeCount
          {
            d obj.MoveToAttributeIndex(i)
            w obj.Name,":",obj.Value,!
          }
      }
    }
    
  }catch(ex)
  {
    write "Error ", ex.DisplayString(),!
  }
}

输出:
xmlns:xml:http://www.w3.org/XML/1998/namespace
xmlns:test
xmlns:mc:test1
xmlns:xsi:http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation:test2
root\: this is a test
code:test3

可以调用操作系统的命令来获取CPU序列号。例如在Cache' for Windows上,可以执行:
SAMPLES>s args=3
SAMPLES>s args(1)="CPU"
SAMPLES>s args(2)="get"
SAMPLES>s args(3)="ProcessorID"
SAMPLES>d $ZF(-100,"","wmic",.args)
ProcessorId
0FABFBFF000506EX
0FABFBFF000006EX
0FABFBFF000006EX
0FABFBFF000006EX

系统类%Library.GTWCatalog有一个类查询SQLDataSources用来获取DSN,例如:

ClassMethod Test()
{
    set rs=##class(%ResultSet).%New()
    set rs.ClassName="%Library.GTWCatalog"
    set rs.QueryName="SQLDataSources"
    set sc=rs.Execute(1)  
    If $$$ISERR(sc) Do DisplayError^%apiOBJ(sc) Quit
    while rs.%Next() { do rs.%Print() }
}