⚲
Project
Profile
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Search
:
Projects
All Projects
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Saxon
Overview
Roadmap
Issues
Calendar
Blog
Documents
Forums
Files
Repository
Download (823 Bytes)
Bug #6381
» JavaDefaultNamespaceTest1.java
Martin Honnen
, 2024-03-31 14:45
import
net.sf.saxon.s9api.*
;
import
java.io.File
;
public
class
JavaDefaultNamespaceTest1
{
public
static
void
main
(
String
[]
args
)
throws
SaxonApiException
{
Processor
processor
=
new
Processor
();
System
.
out
.
println
(
processor
.
getSaxonProductVersion
());
XPathCompiler
xpathProcessor
=
processor
.
newXPathCompiler
();
xpathProcessor
.
setUnprefixedElementMatchingPolicy
(
UnprefixedElementMatchingPolicy
.
ANY_NAMESPACE
);
DocumentBuilder
docBuilder
=
processor
.
newDocumentBuilder
();
XdmNode
doc
=
docBuilder
.
build
(
new
File
(
"sample1.xml"
));
System
.
out
.
println
(
xpathProcessor
.
evaluate
(
"/root/foo"
,
doc
));
doc
=
docBuilder
.
build
(
new
File
(
"sample2.xml"
));
System
.
out
.
println
(
xpathProcessor
.
evaluate
(
"/root/foo"
,
doc
));
}
}
« Previous
1
2
3
4
Next »
(2-2/4)
Loading...