Hi all,
I am trying to use XPath to get a list of all the persistence units in persistence.xml and am having trouble. The one that I thought would work was:
//persistence/persistence-unit
*
The latter gives me the persistence child which is at least something, I can then manually iterate through, but that defeats the purpose of XPath.
Here is a snippet of my persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
Any ideas?
Walter