/** * Serialize this node into the writer as XML. */ public static void serializeAsXML(Node node, Writer writer) { serializeAsXML(node, new HashMap(), writer); }
/** * Return a string containing this node serialized as XML. * The specified Map associates prefixes with namespace URLs. */ public static String nodeToString(Node node, Map namespaces) { StringWriter sw = new StringWriter(); serializeAsXML(node, namespaces, sw); return sw.toString(); }
protected void printDocumentation(Element docElement, Definition def, PrintWriter pw) throws WSDLException { if (docElement != null) { DOM2Writer.serializeAsXML(docElement, def.getNamespaces(), pw); pw.println(); } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { Schema schema = (Schema)extension; pw.print(" "); DOM2Writer.serializeAsXML(schema.getElement(), def.getNamespaces(), pw); pw.println(); } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { UnknownExtensibilityElement unknownExt = (UnknownExtensibilityElement)extension; pw.print(" "); DOM2Writer.serializeAsXML(unknownExt.getElement(), def.getNamespaces(), pw); pw.println(); } }
/** * Print an XML declaration before serializing the element. * The specified Map associates prefixes with namespace URLs. */ public static void serializeElementAsDocument(Element el, Map namespaces, Writer writer) { PrintWriter pw = new PrintWriter(writer); String javaEncoding = (writer instanceof OutputStreamWriter) ? ((OutputStreamWriter) writer).getEncoding() : null; String xmlEncoding = java2XMLEncoding(javaEncoding); if (xmlEncoding != null) { pw.println(Constants.XML_DECL_START + xmlEncoding + Constants.XML_DECL_END); } else { pw.println("<?xml version=\"1.0\"?>"); } serializeAsXML(el, namespaces, writer); }
/** * Serialize this node into the writer as XML. */ public static void serializeAsXML(Node node, Writer writer) { serializeAsXML(node, new HashMap(), writer); }
/** * Return a string containing this node serialized as XML. * The specified Map associates prefixes with namespace URLs. */ public static String nodeToString(Node node, Map namespaces) { StringWriter sw = new StringWriter(); serializeAsXML(node, namespaces, sw); return sw.toString(); }
protected void printDocumentation(Element docElement, Definition def, PrintWriter pw) throws WSDLException { if (docElement != null) { DOM2Writer.serializeAsXML(docElement, def.getNamespaces(), pw); pw.println(); } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { Schema schema = (Schema)extension; pw.print(" "); DOM2Writer.serializeAsXML(schema.getElement(), def.getNamespaces(), pw); pw.println(); } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { UnknownExtensibilityElement unknownExt = (UnknownExtensibilityElement)extension; pw.print(" "); DOM2Writer.serializeAsXML(unknownExt.getElement(), def.getNamespaces(), pw); pw.println(); } }
/** * Print an XML declaration before serializing the element. * The specified Map associates prefixes with namespace URLs. */ public static void serializeElementAsDocument(Element el, Map namespaces, Writer writer) { PrintWriter pw = new PrintWriter(writer); String javaEncoding = (writer instanceof OutputStreamWriter) ? ((OutputStreamWriter) writer).getEncoding() : null; String xmlEncoding = java2XMLEncoding(javaEncoding); if (xmlEncoding != null) { pw.println(Constants.XML_DECL_START + xmlEncoding + Constants.XML_DECL_END); } else { pw.println("<?xml version=\"1.0\"?>"); } serializeAsXML(el, namespaces, writer); }
if (fileName != null) { java.io.FileWriter writer = new java.io.FileWriter(new File(baseFolder, fileName)); DOM2Writer.serializeAsXML(schema.getElement(), definition.getNamespaces(), writer); writer.flush(); writer.close();