summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/js/htdocs/xmlutil.js
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-02-26 20:59:35 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-02-26 20:59:35 +0000
commit7c018c6fb691b65ac1cb181a95f5766e2933eb3c (patch)
treeb12eb4fd6fc05faebd9d481f1d57599cd0b2829e /sca-cpp/trunk/modules/js/htdocs/xmlutil.js
parent0ee21c5d9657a1259a731722f53666ad135279bb (diff)
Correctly pass query strings through component wiring redirects and improve format of XML and JSON response documents.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1074924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/js/htdocs/xmlutil.js')
-rw-r--r--sca-cpp/trunk/modules/js/htdocs/xmlutil.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/sca-cpp/trunk/modules/js/htdocs/xmlutil.js b/sca-cpp/trunk/modules/js/htdocs/xmlutil.js
index b3fb34435a..3965596599 100644
--- a/sca-cpp/trunk/modules/js/htdocs/xmlutil.js
+++ b/sca-cpp/trunk/modules/js/htdocs/xmlutil.js
@@ -61,7 +61,10 @@ function childElements(e) {
* Return the child text nodes of an element.
*/
function childText(e) {
- return filter(function(n) { return n.nodeType == 3; }, nodeList(e.childNodes));
+ function trim(s) {
+ return s.replace(/^\s*/, '').replace(/\s*$/, '');
+ }
+ return filter(function(n) { return n.nodeType == 3 && trim(n.nodeValue) != ''; }, nodeList(e.childNodes));
}
/**