Code example for NodeList

Methods: getLength, item

0
   * @param nodeList a <code>NodeList</code> value 
   * @return a <code>String</code> value 
   */ 
  public static String systemId(NodeList nodeList)
  { 
    if (nodeList == null || nodeList.getLength() == 0)
      return null; 
     
    Node node = nodeList.item(0);
    int nodeHandler = ((DTMNodeProxy)node).getDTMNodeNumber();
    SourceLocator locator = ((DTMNodeProxy)node).getDTM()
      .getSourceLocatorFor(nodeHandler);
 
    if (locator != null)
      return locator.getSystemId();
    else 
      return null; 
  } 
 
  /** 
   * <code>publicId</code> returns the public identifier of the current