org.apache.ojb.broker.util
Class XmlHelper

java.lang.Object
  extended by org.apache.ojb.broker.util.XmlHelper

public class XmlHelper
extends Object

Simple helper class with static methods for common XML-handling tasks.

Since:
OJB 1.0.4
Version:
CVS $Id: XmlHelper.java,v 1.1 2007-08-24 22:17:36 ewestfal Exp $

Field Summary
static String XML_EOL
          End-of-line string used in serialized XML.
 
Constructor Summary
XmlHelper()
           
 
Method Summary
static void appendSerializedAttributes(StringBuffer buf, String prefix, Properties attributeProperties)
          Appends an XML-string with serialized configuration attributes to the specified buffer.
static String getSerializedAttributes(String prefix, Properties attributeProperties)
          Returns an XML-string with serialized configuration attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_EOL

public static final String XML_EOL
End-of-line string used in serialized XML.

Constructor Detail

XmlHelper

public XmlHelper()
Method Detail

getSerializedAttributes

public static String getSerializedAttributes(String prefix,
                                             Properties attributeProperties)
Returns an XML-string with serialized configuration attributes. Used when serializing AttributeContainer attributes.

Parameters:
prefix - the line prefix (ie indent) or null for no prefix
attributeProperties - the properties object holding attributes to be serialized (null-safe)
Returns:
XML-string with serialized configuration attributes (never null)

appendSerializedAttributes

public static void appendSerializedAttributes(StringBuffer buf,
                                              String prefix,
                                              Properties attributeProperties)
Appends an XML-string with serialized configuration attributes to the specified buffer. Used when serializing AttributeContainer attributes.

Parameters:
buf - the string buffer to append to
prefix - the line prefix (ie indent) or null for no prefix
attributeProperties - the properties object holding attributes to be serialized (null-safe)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.