summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/js/htdocs/xmlutil.js
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-12-24 04:35:53 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-12-24 04:35:53 +0000
commit86fa951ba99a04edf6a41b04751a1ad679dc2d36 (patch)
treec366d8560cf95210f8c2400fdec76652142950f9 /sca-cpp/trunk/modules/js/htdocs/xmlutil.js
parent150feb74a6f2897d860be360cedf641e004f5ca8 (diff)
Apply roundtripping fixes from SVN r1052432 to Python and Javascript scripts.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1052445 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.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/sca-cpp/trunk/modules/js/htdocs/xmlutil.js b/sca-cpp/trunk/modules/js/htdocs/xmlutil.js
index 121bf8692c..1bec45f9b9 100644
--- a/sca-cpp/trunk/modules/js/htdocs/xmlutil.js
+++ b/sca-cpp/trunk/modules/js/htdocs/xmlutil.js
@@ -84,6 +84,15 @@ function readElements(l) {
}
/**
+ * Return true if a list of strings contains an XML document.
+ */
+function isXML(l) {
+ if (isNil(l))
+ return false;
+ return car(l).substring(0, 5) == '<?xml';
+}
+
+/**
* Parse a list of strings representing an XML document.
*/
function parseXML(l) {
@@ -107,7 +116,7 @@ function parseXML(l) {
* Read a list of values from an XML document.
*/
function readXMLDocument(doc) {
- var root = nodeList(doc.childNodes);
+ var root = childElements(doc);
if (isNil(root))
return mklist();
return mklist(readElement(car(root)));