Пример #1
0
  /**
   * Interactive inspection of an XML context. This function can be called anytime. Also, a
   * stand-alone utility program is provided to inspect XML documents.
   *
   * @param context the XML context
   */
  public static void debug(Object context) {
    // Instanties a new XML debugger and executes it immediately
    // for the given file.

    XPathDebugger debugger = new XPathDebugger();
    debugger.set_context(context);

    debugger.prompt();
  } // debug()
Пример #2
0
  @Override
  protected void on_document(File file, Document doc) {
    if (context_object != null) {
      throw new RuntimeException(
          String.format("%s: context already set, this is extra", file.getPath()));
    }

    // Otherwise, set the context
    set_context(doc);
  } // on_document();