File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ --- org/jivesoftware/smackx/pubsub/util/XmlUtils.java
2
+ +++ org/jivesoftware/smackx/pubsub/util/XmlUtils.java
3
+ @@ -28,32 +28,6 @@ import javax.xml.transform.stream.StreamSource;
4
+ */
5
+ public class XmlUtils
6
+ {
7
+ - /**
8
+ - *
9
+ - * @param header Just a title for the stanza for readability. Single word no spaces since
10
+ - * it is inserted as the root element in the output.
11
+ - * @param xml The string to pretty print
12
+ - */
13
+ - static public void prettyPrint(String header, String xml)
14
+ - {
15
+ - try
16
+ - {
17
+ - Transformer transformer = TransformerFactory.newInstance().newTransformer();
18
+ - transformer.setOutputProperty(OutputKeys.INDENT, "yes");
19
+ - transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "3");
20
+ -
21
+ - if (header != null)
22
+ - {
23
+ - xml = "\n<" + header + ">" + xml + "</" + header + '>';
24
+ - }
25
+ - transformer.transform(new StreamSource(new StringReader(xml)), new StreamResult(System.out));
26
+ - }
27
+ - catch (Exception e)
28
+ - {
29
+ - System.out.println("Something wrong with xml in \n---------------\n" + xml + "\n---------------");
30
+ - e.printStackTrace();
31
+ - }
32
+ - }
33
+
34
+ static public void appendAttribute(StringBuilder builder, String att, String value)
35
+ {
You can’t perform that action at this time.
0 commit comments