Hi I have a doubt related to XPath.
My xml file looks as follows.
<?xml version="1.0" encoding="UTF-8"?>
<name xmlns="http://localhost/book" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://localhost/book books.xsd">
Java and XML
</name>
here is the xpath query and its result
/*
- returns element "name"
/*/text()
- returns text "Java and XML"
/name
- no result
/name/text()
- no result
Why specifying name is not giving any result?
name
node missed the namespace. How do you use the XPath query, in XSL file or application? Can you provide more information? – Edward Zhu