org.apache.ojb.broker.util
Class XmlHelper

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

public class XmlHelper
extends java.lang.Object

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

Since:
OJB 1.0.4
Version:
CVS $Id: XmlHelper.java 365232 2005-12-21 22:36:07Z tomdz $

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

Field Detail

XML_EOL

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

Constructor Detail

XmlHelper

public XmlHelper()
Method Detail

getSerializedAttributes

public static java.lang.String getSerializedAttributes(java.lang.String prefix,
                                                       java.util.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(java.lang.StringBuffer buf,
                                              java.lang.String prefix,
                                              java.util.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)


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30