You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by un...@apache.org on 2004/11/17 19:01:55 UTC

cvs commit: jakarta-slide/src/share/org/apache/slide/extractor SimpleXmlExtractor.java

unico       2004/11/17 10:01:55

  Modified:    src/share/org/apache/slide/extractor Tag:
                        SLIDE_2_1_RELEASE_BRANCH SimpleXmlExtractor.java
  Log:
  handle attribute xpath result types
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.2   +6 -3      jakarta-slide/src/share/org/apache/slide/extractor/SimpleXmlExtractor.java
  
  Index: SimpleXmlExtractor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/extractor/SimpleXmlExtractor.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- SimpleXmlExtractor.java	29 Sep 2004 15:01:26 -0000	1.7.2.1
  +++ SimpleXmlExtractor.java	17 Nov 2004 18:01:55 -0000	1.7.2.2
  @@ -27,6 +27,7 @@
   import org.apache.slide.util.conf.Configurable;
   import org.apache.slide.util.conf.Configuration;
   import org.apache.slide.util.conf.ConfigurationException;
  +import org.jdom.Attribute;
   import org.jdom.Document;
   import org.jdom.JDOMException;
   import org.jdom.Text;
  @@ -90,6 +91,8 @@
           if (nodeList.size() > 0) {
               if (nodeList.get(0) instanceof Text) {
                   return ((Text) nodeList.get(0)).getText();
  +            } else if (nodeList.get(0) instanceof Attribute) {
  +                return ((Attribute) nodeList.get(0)).getValue();
               } else if (nodeList.get(0) instanceof String) {
                   return nodeList.get(0);
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org