Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to extract column from table #13

Open
chrisdevilliers opened this issue Feb 4, 2016 · 2 comments
Open

Unable to extract column from table #13

chrisdevilliers opened this issue Feb 4, 2016 · 2 comments

Comments

@chrisdevilliers
Copy link

Given a simple 3x3 table with HTML tree:

{<<"table">>,[],[
    {<<"tr">>,[],[
        {<<"td">>,[],[<<"100">>]},
        {<<"td">>,[],[<<"200">>]},
        {<<"td">>,[],[<<"300">>]}
    ]},
    {<<"tr">>,[],[
        {<<"td">>,[],[<<"400">>]},
        {<<"td">>,[],[<<"500">>]},
        {<<"td">>,[],[<<"600">>]}
    ]},
    {<<"tr">>,[],[
        {<<"td">>,[],[<<"700">>]},
        {<<"td">>,[],[<<"800">>]},
        {<<"td">>,[],[<<"900">>]}
    ]}
]}

and an XPath expression to extract the first column:

"//table/tr/td[1]"

I expected the following output:

[
    {<<"td">>,[],[<<"100">>]},
    {<<"td">>,[],[<<"400">>]},
    {<<"td">>,[],[<<"700">>]}
]

Instead I only get the first row's column:

[{<<"td">>,[],[<<"100">>]}]

I tested this with a few online XPath testers and they all give 100,400,700.

@retnuh
Copy link
Owner

retnuh commented Feb 5, 2016

Hi Chris, just to let you know, I was never the developer for this project - I was using it in one of my own projects, and with the permission of the original developer, put it up on github. I don't have much time to spend on it, either. In fact, I only recently got around to accepting some pull requests that were several years old! D'oh!

So basically, it is very unlikely I'll have time to dig into this. If you are able to find and fix the problem, I will try to get a pull request or a patch merged in a reasonable amount of time.

@chrisdevilliers
Copy link
Author

Cool, no worries. I doubt that I will get around to it either :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants