1.

What Should I Be Using Instead Of Xerces' Xml, Html Or Xhtml Serializers?

Answer»

As of the 2.9.0 release Xerces-J began sharing a common serialization codebase with Xalan and now includes serializer.jar with its DISTRIBUTION for DOM Level 3 serialization support. The entire org.apache.xml.serialize package was deprecated in Xerces 2.9.0. The HTML and XHTML serializers were previously deprecated in the Xerces 2.6.2 release. You can find more details about the rationale for this decision here in the ARCHIVES.

If you want to achieve interoperability and AVOID using deprecated APIs, you should not be using Xerces serialization code directly. Instead, the JAXP TRANSFORMER API should be used to serialize HTML, XHTML, and SAX. The DOM Level 3 Load and Save API (or JAXP Transformer API) should be used to serialize DOM.

As of the 2.9.0 release Xerces-J began sharing a common serialization codebase with Xalan and now includes serializer.jar with its distribution for DOM Level 3 serialization support. The entire org.apache.xml.serialize package was deprecated in Xerces 2.9.0. The HTML and XHTML serializers were previously deprecated in the Xerces 2.6.2 release. You can find more details about the rationale for this decision here in the archives.

If you want to achieve interoperability and avoid using deprecated APIs, you should not be using Xerces serialization code directly. Instead, the JAXP Transformer API should be used to serialize HTML, XHTML, and SAX. The DOM Level 3 Load and Save API (or JAXP Transformer API) should be used to serialize DOM.



Discussion

No Comment Found