I am trying to write some xml generated by my Android app to a file and I'm trying to use javax.xml.transform to do this. Only problem is that javax.xml.transform is not being found by eclipse.
The only options that come up are javax.xml and javax.xml.parsers. Does anyone know what could be going on?
Edit: Just an fyi I have Java JDK 6 update 22 installed.
With Java releases lower than Java 11, JAXB was part of the JVM and you could use it directly without defining additional libaries. As of Java 11, JAXB is not part of the JRE anymore and you need to configure the relevant libraries via your dependency management system, for example Maven or Gradle.
Package javax. xml. bind Description. Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.
package javax.xml.stream. Defines interfaces and classes for the Streaming API for XML (StAX).
I just found out what to do. If you right click on whatever project your working on and go to properties. Then in the libraries tab click add libraries and add the JRE System Library then it has a bunch of new imports that can be used including javax.xml.transform.
That took forever to find out that simple thing =P. But now I know.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With