[Yanel-commits] rev 50376 -
public/yanel/trunk/src/build/targets/create-new-resource-type/from-scratch-resource-template/examples/BasicXML
michi at wyona.com
michi at wyona.com
Sun Jun 13 14:24:08 CEST 2010
Author: michi
Date: 2010-06-13 14:24:08 +0200 (Sun, 13 Jun 2010)
New Revision: 50376
Modified:
public/yanel/trunk/src/build/targets/create-new-resource-type/from-scratch-resource-template/examples/BasicXML/FromScratchResource.java
Log:
basic xml example updated
Modified: public/yanel/trunk/src/build/targets/create-new-resource-type/from-scratch-resource-template/examples/BasicXML/FromScratchResource.java
===================================================================
--- public/yanel/trunk/src/build/targets/create-new-resource-type/from-scratch-resource-template/examples/BasicXML/FromScratchResource.java 2010-06-13 12:23:27 UTC (rev 50375)
+++ public/yanel/trunk/src/build/targets/create-new-resource-type/from-scratch-resource-template/examples/BasicXML/FromScratchResource.java 2010-06-13 12:24:08 UTC (rev 50376)
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Wyona
+ * Copyright 2010 Wyona
*/
package bar.foo.yanel.impl.resources;
@@ -23,11 +23,11 @@
* Since you extend the BasicXMLResource this has to contain well-formed xml.
* Beside the simple StringBuffer there are several other ways how to construct the xml. see dom, jdom, org.apache.commons.io.IOUtils and so on
*/
- protected InputStream getContentXML(String viewId) {
+ protected InputStream getContentXML(String viewId) throws Exception {
if (log.isDebugEnabled()) {
log.debug("requested viewId: " + viewId);
}
- StringBuffer sb = new StringBuffer("<?xml version=\"1.0\"?>");
+ StringBuilder sb = new StringBuilder("<?xml version=\"1.0\"?>");
sb.append("<root>");
sb.append("<child>");
sb.append("Hello World!");
More information about the Yanel-commits
mailing list