Variable Utl

Utl: {
    getElementValue(el): string;
    loadXML(url, callback): DOMImplementation | XMLDocument;
    parseXML(text): XMLDocument;
    renType(url, type): string;
} = ...

Type declaration

  • getElementValue:function
    • Parameters

      • el: HTMLElement

        the DOM element.

      Returns string

      the concatenation of the text nodes under the specified DOM element.

  • loadXML:function
    • Loads XML from the resource at the specified URL. If the callback method is specified, the URL is loaded asynchronously and the callback is called with the XML document after the document is loaded and parsed.

      Parameters

      • url: string
      • callback: CallableFunction

      Returns DOMImplementation | XMLDocument

  • parseXML:function
    • Parses and returns the XML document from the specified text.

      Parameters

      • text: string

      Returns XMLDocument

  • renType:function
    • Renames the type embedded in an URL For example,

      zk.xml.Utl.renType("/zkdemo/img/whatever-off.gif", "on");
      //return "/zkdemo/img/whatever-on.gif"

      as shown above, it assumes the type is embedded after dash (-).

      Parameters

      • url: string

        the URL to modify

      • type: string

        the type to replace with

      Returns string

      the new URL after replacing the type