com.google.api.ads.common.lib.utils.logging
Class PrettyPrinter

java.lang.Object
  extended by com.google.api.ads.common.lib.utils.logging.PrettyPrinter
All Implemented Interfaces:
PrettyPrinterInterface

public final class PrettyPrinter
extends Object
implements PrettyPrinterInterface

A utility class that pretty prints XML messages.

Author:
Joseph DiLallo

Constructor Summary
PrettyPrinter()
          Default constructor.
 
Method Summary
 String prettyPrint(String xml)
          Transforms XML into a pretty-printed format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrettyPrinter

public PrettyPrinter()
Default constructor.

Method Detail

prettyPrint

public String prettyPrint(String xml)
Transforms XML into a pretty-printed format. If there is an error initializing the PrettyPrinter or transforming the XML message, the raw XML message will be returned.

Specified by:
prettyPrint in interface PrettyPrinterInterface
Parameters:
xml - the XML message to be pretty printed
Returns:
the given message in pretty-printed format


Copyright © 2012. All Rights Reserved.