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

Logic Operation Support #4

Closed
code4craft opened this issue Mar 8, 2014 · 0 comments
Closed

Logic Operation Support #4

code4craft opened this issue Mar 8, 2014 · 0 comments
Assignees
Milestone

Comments

@code4craft
Copy link
Owner

Support for logic operation and/or/() in attribute selector.

@Test
    public void testLogicOperation() {

        Document document = Jsoup.parse(html);

        String result = Xsoup.select(document, "//*[@id=te or @id=test]/text()").get();
        assertEquals("aaa", result);

        result = Xsoup.select(document, "//*[@id=te and @id=test]/text()").get();
        assertNull(result);

        result = Xsoup.select(document, "//*[(@id=te or @id=test) and @id=test]/text()").get();
        assertEquals("aaa", result);

        result = Xsoup.select(document, "//*[@id=te or (@id=test and @id=test)]/text()").get();
        assertEquals("aaa", result);
    }
@code4craft code4craft self-assigned this Mar 8, 2014
code4craft added a commit that referenced this issue Mar 8, 2014
@code4craft code4craft added this to the xsoup-0.2.0 milestone Mar 8, 2014
code4craft added a commit that referenced this issue Mar 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant