This would most likely be part of the Java EE 5/6 API (if it was possible, which I don't think it is). Are you trying to dynamically switch the persitence provider for a particular persistence unit from Hibernate to TopLink, for example? Or perhaps, set some properties for testing and set other properties for production?
It would be interesting if that entire persistence.xml file was optional (like ejb-jar.xml in EJB3) and we could simply use annotations on types/methods instead.
we have an annotation, but it does not have the provider element, for example.
I only want to modify properties like show_sql, ect... from java code