You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2001/10/11 22:27:23 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/util DOMUtil.java

elena       01/10/11 13:27:23

  Modified:    java/src/org/apache/xerces/util DOMUtil.java
  Log:
  getLocalName will return either localname or name of the node
  
  Revision  Changes    Path
  1.5       +5 -2      xml-xerces/java/src/org/apache/xerces/util/DOMUtil.java
  
  Index: DOMUtil.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/DOMUtil.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DOMUtil.java	2001/09/24 19:52:01	1.4
  +++ DOMUtil.java	2001/10/11 20:27:23	1.5
  @@ -683,9 +683,12 @@
           return node.getNodeName();
       } // getLocalName(Element):  String
   
  -    // return the local name of this element
  +    /** returns local name of this element if not null, otherwise
  +        returns the name of the node
  +    */
       public static String getLocalName(Node node) {
  -        return node.getLocalName();
  +        String name = node.getLocalName();
  +        return (name!=null)? name:node.getNodeName();
       } // getLocalName(Element):  String
   
       public static Element getParent(Element elem) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org