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

Node.absUrl returns empty String #44

Closed
hachenberg opened this issue Nov 5, 2010 · 2 comments
Closed

Node.absUrl returns empty String #44

hachenberg opened this issue Nov 5, 2010 · 2 comments

Comments

@hachenberg
Copy link

Hi

I tried different nodes, but all I get is an empty String when calling .absUrl(.attr("href")). In contrast, when calling .attr("abs:href") I DO GET THE CORRECT absolute URL!?

So it seems something is wrong with the absUrl(...) function.

Cheers, Christian

@jhy
Copy link
Owner

jhy commented Nov 14, 2010

Hi,

I think you are calling the node.absUrl() method incorrectly. The argument to absUrl() should be the attribute key (e.g. "href"), not the attribute's value, which is what you're sending.

E.g. try: linkEl.absUrl("href");

I have updated the javadoc to provide a clearer example.

Thanks,
Jonathan

@hachenberg
Copy link
Author

Oh, that might be the reason. Thanks a lot for your help and effort!

Best, Christian

This issue was closed.
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