public class I18nXmlUtility extends Object
| Constructor and Description |
|---|
I18nXmlUtility() |
| Modifier and Type | Method and Description |
|---|---|
static String |
addElementAndGetDocumentAsString(Document doc,
Element el)
Adds the specified element to the XML document and returns the document's contents as a String
|
protected static Object |
createFormattedMessageXML(Document document,
String key,
Object... args)
Creates XML that represents a call to ResourceLoader.getFormattedMessage().
|
static Document |
createXmlDocument()
Creates a new XML Document instance
|
static DocumentBuilder |
getDocumentBuilder()
Gets a DocumentBuilder instance
|
static String |
getLocalizedMessage(ResourceLoader rb,
Node node)
Parses an XML node expectedly created via createFormattedMessageXML, and localizes it into a user presentable message using the specified ResourceLoader
|
public static DocumentBuilder getDocumentBuilder()
public static Document createXmlDocument()
public static String addElementAndGetDocumentAsString(Document doc, Element el)
protected static Object createFormattedMessageXML(Document document, String key, Object... args)
document - the document that will be used to create XMLkey - the formatted message keyargs - the arguments to the formatted message. Elements are appended as is (assumed to be nested 'message' tags); everything else is embedded into 'arg' tagspublic static String getLocalizedMessage(ResourceLoader rb, Node node)
Copyright © 2003–2021 Sakai Project. All rights reserved.