Class XMLResourceBundleParser

java.lang.Object
org.exoplatform.services.resources.XMLResourceBundleParser

public class XMLResourceBundleParser extends Object
A parser for XML resource bundle having the following rules:
  • The root document element is named "bundle"
  • Any non root element can have any name
  • Any non root element content must not have mixed content (i.e text and children elements)
  • Any element having textual content is considered as a bundle entry with they key formed by the dot concatenation of its parent element name except the root element and the value is the text content
For instance the following document: <bundle> <foo> <A>1<A> <B>2<B> </foo> <C>3<C> </bundle> will give the bundle with entries:
  • foo.A=1
  • foo.B=2
  • C=3
Version:
$Revision$
Author:
Julien Viet