commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JXPATH-118) wrongs xpath string from pointer.asPath()
Date Sun, 22 Nov 2015 14:25:10 GMT

     [ https://issues.apache.org/jira/browse/JXPATH-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benedikt Ritter updated JXPATH-118:
-----------------------------------
    Description: 
Hello ! 
after playing around awhile with JXPath and Jdom i guess i've found a bug:

when trying to iterate over a html document parsed with jdom in this way:

{code:java}
iterator = context.iteratePointers("/HTML[1]/BODY[1]/P[3]/TABLE[1]/TR/TD[3]");
                 
                 while(iterator.hasNext()){
                     Pointer pointer = (Pointer)iterator.next();
                     System.out.println("path:"+ pointer.asPath()+":"+((Content)pointer.getNode()).getValue());
                 }
{code}

i get some wrong outputs.

this shows sometime the wrong path for example:
/HTML[1]/BODY[1]/P[3]/TABLE[1]/TR[2]/TD[1]
but the value found is correct. I

i would expect for example
/HTML[1]/BODY[1]/P[3]/TABLE[1]/TR[2]/TD[3]

Am i wrong or is this a bug !? 
greetings
  david croe





  was:
Hello ! 
after playing around awhile with JXPath and Jdom i guess i've found a bug:

when trying to iterate over a html document parsed with jdom in this way:

iterator = context.iteratePointers("/HTML[1]/BODY[1]/P[3]/TABLE[1]/TR/TD[3]");
                 
                 while(iterator.hasNext()){
                     Pointer pointer = (Pointer)iterator.next();
                     System.out.println("path:"+ pointer.asPath()+":"+((Content)pointer.getNode()).getValue());
                 }

i get some wrong outputs.

this shows sometime the wrong path for example:
/HTML[1]/BODY[1]/P[3]/TABLE[1]/TR[2]/TD[1]
but the value found is correct. I

i would expect for example
/HTML[1]/BODY[1]/P[3]/TABLE[1]/TR[2]/TD[3]

Am i wrong or is this a bug !? 
greetings
  david croe






> wrongs xpath string from pointer.asPath()
> -----------------------------------------
>
>                 Key: JXPATH-118
>                 URL: https://issues.apache.org/jira/browse/JXPATH-118
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: jdk 1.603 jdom 1.1
>            Reporter: David CroƩ
>             Fix For: 1.4
>
>         Attachments: JXPath118Test.java, JXPath118Test.java
>
>
> Hello ! 
> after playing around awhile with JXPath and Jdom i guess i've found a bug:
> when trying to iterate over a html document parsed with jdom in this way:
> {code:java}
> iterator = context.iteratePointers("/HTML[1]/BODY[1]/P[3]/TABLE[1]/TR/TD[3]");
>                  
>                  while(iterator.hasNext()){
>                      Pointer pointer = (Pointer)iterator.next();
>                      System.out.println("path:"+ pointer.asPath()+":"+((Content)pointer.getNode()).getValue());
>                  }
> {code}
> i get some wrong outputs.
> this shows sometime the wrong path for example:
> /HTML[1]/BODY[1]/P[3]/TABLE[1]/TR[2]/TD[1]
> but the value found is correct. I
> i would expect for example
> /HTML[1]/BODY[1]/P[3]/TABLE[1]/TR[2]/TD[3]
> Am i wrong or is this a bug !? 
> greetings
>   david croe



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message