List of usage examples for org.w3c.dom Document getNodeValue
public String getNodeValue() throws DOMException;
From source file:gov.hhs.fha.nhinc.lift.proxy.util.ProxyUtil.java
public static org.w3c.dom.Element marshal(Object obj) throws JAXBException { try {// w w w .j a va2 s . com Document doc = null; JAXBContext jc = JAXBContext.newInstance(obj.getClass()); Marshaller marshaller = jc.createMarshaller(); javax.xml.parsers.DocumentBuilderFactory dbf; dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); doc = dbf.newDocumentBuilder().newDocument(); marshaller.marshal(obj, doc); log.info("Marshal: " + doc.getNodeValue()); return doc.getDocumentElement(); } catch (ParserConfigurationException ex) { throw new JAXBException("Unable to create document: " + ex.getMessage()); } }