Example 1: Displaying SAX attributes of an XML node

FUNCTION displayAttributes( a )
   DEFINE a om.SaxAttributes 
   DEFINE i INTEGER
   FOR i=1 to a.getLength()
      DISPLAY a.getName(i) || "=[" || a.getValueByIndex(i) || "]"
   END FOR
END FUNCTION