I have a case with an xml as input and a different xml as output :
I have the choice between using XSL and Unmarshalling marshalling through JAXB.
Performance wise, is there any real difference ?
I have a case with an xml as input and a different xml as
Share
Firstly, programmer performance is usually much more important than machine performance. A good fast server costs less than employing a programmer for a day. So are you asking the right question?
Secondly, if the transformation is simple then in both cases the cost will be dominated by parsing and serialization costs, and there is no reason why these should differ in the two cases. If the transformation is more complex, then its performance depends in practice on the skills of the person writing the code, so it comes back to a programming question again.
I would say that the real difference between using JAXB and using XSLT will be that the XSLT solution is likely to be fewer lines of code, and less sensitive to schema change.