VIVO-806 Remove deprecation warnings.
This commit is contained in:
parent
f539837b6d
commit
4225807dfa
1 changed files with 4 additions and 7 deletions
|
@ -28,21 +28,16 @@ import javax.xml.xpath.XPathConstants;
|
||||||
import javax.xml.xpath.XPathExpressionException;
|
import javax.xml.xpath.XPathExpressionException;
|
||||||
import javax.xml.xpath.XPathFactory;
|
import javax.xml.xpath.XPathFactory;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.xml.serialize.XMLSerializer;
|
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.DocumentType;
|
import org.w3c.dom.DocumentType;
|
||||||
import org.w3c.dom.Element;
|
|
||||||
import org.w3c.dom.NamedNodeMap;
|
import org.w3c.dom.NamedNodeMap;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import org.xml.sax.InputSource;
|
import org.xml.sax.InputSource;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
import edu.cornell.mannlib.semservices.util.MetadataNamespaceContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience Class to parse XML strings to DOM Document for XML contents
|
* Convenience Class to parse XML strings to DOM Document for XML contents
|
||||||
* retrieval.
|
* retrieval.
|
||||||
|
@ -117,14 +112,16 @@ public class XMLUtils {
|
||||||
* @param doc
|
* @param doc
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public static void serializeDoc(Document doc) throws IOException {
|
public static void serializeDoc(Document doc) throws IOException {
|
||||||
XMLSerializer serializer = new XMLSerializer();
|
org.apache.xml.serialize.XMLSerializer serializer = new org.apache.xml.serialize.XMLSerializer();
|
||||||
serializer.setOutputByteStream(System.out);
|
serializer.setOutputByteStream(System.out);
|
||||||
serializer.serialize(doc);
|
serializer.serialize(doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public static String serializeDoctoString(Document doc) throws IOException {
|
public static String serializeDoctoString(Document doc) throws IOException {
|
||||||
XMLSerializer serializer = new XMLSerializer();
|
org.apache.xml.serialize.XMLSerializer serializer = new org.apache.xml.serialize.XMLSerializer();
|
||||||
ByteArrayOutputStream bout = new ByteArrayOutputStream();
|
ByteArrayOutputStream bout = new ByteArrayOutputStream();
|
||||||
|
|
||||||
serializer.setOutputByteStream(bout);
|
serializer.setOutputByteStream(bout);
|
||||||
|
|
Loading…
Add table
Reference in a new issue