EdgeExpressDB
view release on metacpan or search on metacpan
www/edgeexpress/jscript/SpryAssets/SpryXML.js view on Meta::CPAN
Spry.XML.XObject = function()
{
};
Spry.XML.XObject.prototype._value = function()
{
var val = this["#text"];
if (val != undefined)
return val;
return this["#cdata-section"];
};
Spry.XML.XObject.prototype._hasValue = function()
{
return this._value() != undefined;
};
Spry.XML.XObject.prototype._valueIsText = function()
{
return this["#text"] != undefined;
};
Spry.XML.XObject.prototype._valueIsCData = function()
{
return this["#cdata-section"] != undefined;
};
Spry.XML.XObject.prototype._propertyIsArray = function(prop)
{
var val = this[prop];
if (val == undefined)
return false;
return (typeof val == "object" && val.constructor == Array);
};
www/edgeexpress/jscript/SpryAssets/SpryXML.js view on Meta::CPAN
// employees:
// {
// employee:
// [
// {
// @id: "1000",
// name: { "#text": "John Doe" }
// },
// {
// @id: "2000",
// name: { "#cdata-section": "Jane Smith" }
// }
// ]
// }
// }
Spry.XML.documentToObject = function(xmlDoc)
{
var obj = null;
if (xmlDoc && xmlDoc.firstChild)
{
( run in 0.592 second using v1.01-cache-2.11-cpan-454fe037f31 )