We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The example page is very short and is missing an xhtml example. This would be helpful to show how to use namespace for xmlns without prefix.
Example Xhtml file:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Example</title> </head> <body> <div id="content">Somecontent</div> </body> </html>
Matcher usage:
final String NS1 = "http://www.w3.org/1999/xhtml"; String html="<?xml version='1.0' encoding='utf-8'?><!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><title>Example</title></head><body><div id='content'>Somecontent</div></body></html>"; Source xhtml = XhtmlMatchers.xhtml(html); assertThat(xhtml, XhtmlMatchers.hasXPath("//ns1:div[@id='content']", NS1)); assertThat(xhtml, XhtmlMatchers.hasXPath("//ns1:div[@id='content'][text()='Somecontent']", NS1));
The text was updated successfully, but these errors were encountered:
@yegor256 please take a look at it and dispatch (see par.21)
Sorry, something went wrong.
#32 namespaces explained
de183f1
@Rhobal I explained them a bit in de183f1, thanks for the ticket!
Job gh:jcabi/jcabi-matchers#32 is not assigned, can't get performer
gh:jcabi/jcabi-matchers#32
No branches or pull requests
The example page is very short and is missing an xhtml example. This would be helpful to show how to use namespace for xmlns without prefix.
Example
Xhtml file:
Matcher usage:
The text was updated successfully, but these errors were encountered: