I have a situation where I need to use javax.xml library and majority of this comes from Java 6. However my deployment server runs on Java 5, where I don't have control.
So is it possible to add these specific libraries to project and can run in Java 5 environment?
I am mainly using
import javax.xml.bind.*;
import javax.xml.stream.*;
import javax.xml.transform.stream.StreamSource;
code which I am using
XMLInputFactory xif = XMLInputFactory.newFactory();
StreamSource xml = new StreamSource("input.xml");
XMLStreamReader xsr = xif.createXMLStreamReader(xml);
while(xsr.hasNext()) {
if(xsr.isStartElement() && xsr.getLocalName().equals("StandardError")) {
break;
}
xsr.next();
}
So can any one tell how can I avoid this so that My application can run in Java 5 environment without issues.
Between we use maven for building, so any libraries has to go into pom.xml