a:13:{s:9:"#provides";s:18:"dojox.wire.XmlWire";s:9:"#resource";s:15:"wire/XmlWire.js";s:9:"#requires";a:2:{i:0;a:2:{i:0;s:6:"common";i:1;s:16:"dojox.xml.parser";}i:1;a:2:{i:0;s:6:"common";i:1;s:15:"dojox.wire.Wire";}}s:18:"dojox.wire.XmlWire";a:7:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:15:"dojox.wire.Wire";}s:4:"call";a:1:{i:0;s:15:"dojox.wire.Wire";}}s:7:"summary";s:21:"Initialize properties";s:11:"description";s:51:"'args' is just mixed in with no further processing.";s:10:"parameters";a:1:{s:4:"args";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:95:"Arguments to initialize properties path: A simplified XPath to an attribute, a text or elements";}}s:6:"source";s:243:" // summary: // Initialize properties // description: // 'args' is just mixed in with no further processing. // args: // Arguments to initialize properties // path: // A simplified XPath to an attribute, a text or elements";s:9:"classlike";b:1;}s:29:"dojox.wire.XmlWire._wireClass";a:3:{s:9:"prototype";s:18:"dojox.wire.XmlWire";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojox.wire.XmlWire._getValue";a:9:{s:9:"prototype";s:18:"dojox.wire.XmlWire";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"object";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:11:"A root node";}}s:6:"source";s:561:" if(!object || !this.path){ return object; //Node } var node = object; var path = this.path; var i; if(path.charAt(0) == '/'){ // absolute // skip the first expression (supposed to select the top node) i = path.indexOf('/', 1); path = path.substring(i + 1); } var list = path.split('/'); var last = list.length - 1; for(i = 0; i < last; i++){ node = this._getChildNode(node, list[i]); if(!node){ return undefined; //undefined } } var value = this._getNodeValue(node, list[last]); return value; //String||Array";s:7:"summary";s:63:"Return an attribute value, a text value or an array of elements";s:11:"description";s:384:"This method first uses a root node passed in 'object' argument and 'path' property to identify an attribute, a text or elements. If 'path' starts with a slash (absolute), the first path segment is ignored assuming it point to the root node. (That is, "/a/b/@c" and "b/@c" against a root node access the same attribute value, assuming the root node is an element with a tag name, "a".)";s:14:"return_summary";s:36:"A value found, otherwise 'undefined'";s:7:"returns";s:28:"Node|undefined|String||Array";s:7:"private";b:1;}s:28:"dojox.wire.XmlWire._setValue";a:8:{s:9:"prototype";s:18:"dojox.wire.XmlWire";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"object";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:11:"A root node";}s:5:"value";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:14:"A value to set";}}s:6:"source";s:841:" if(!this.path){ return object; //Node } var node = object; var doc = this._getDocument(node); var path = this.path; var i; if(path.charAt(0) == '/'){ // absolute i = path.indexOf('/', 1); if(!node){ var name = path.substring(1, i); node = doc.createElement(name); object = node; // to be returned as a new object } // skip the first expression (supposed to select the top node) path = path.substring(i + 1); }else{ if(!node){ return undefined; //undefined } } var list = path.split('/'); var last = list.length - 1; for(i = 0; i < last; i++){ var child = this._getChildNode(node, list[i]); if(!child){ child = doc.createElement(list[i]); node.appendChild(child); } node = child; } this._setNodeValue(node, list[last], value); return object; //Node";s:7:"summary";s:58:"Set an attribute value or a child text value to an element";s:11:"description";s:363:"This method first uses a root node passed in 'object' argument and 'path' property to identify an attribute, a text or elements. If an intermediate element does not exist, it creates an element of the tag name in the 'path' segment as a child node of the current node. Finally, 'value' argument is set to an attribute or a text (a child node) of the leaf element.";s:7:"returns";s:45:"Node|to be returned as a new object|undefined";s:7:"private";b:1;}s:32:"dojox.wire.XmlWire._getNodeValue";a:9:{s:9:"prototype";s:18:"dojox.wire.XmlWire";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"node";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:6:"A node";}s:3:"exp";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:45:"An expression for attribute, text or elements";}}s:6:"source";s:512:" var value = undefined; if(exp.charAt(0) == '@'){ var attribute = exp.substring(1); value = node.getAttribute(attribute); }else if(exp == "text()"){ var text = node.firstChild; if(text){ value = text.nodeValue; } }else{ // assume elements value = []; for(var i = 0; i < node.childNodes.length; i++){ var child = node.childNodes[i]; if(child.nodeType === 1 /* ELEMENT_NODE */ && child.nodeName == exp){ value.push(child); } } } return value; //String||Array";s:7:"summary";s:63:"Return an attribute value, a text value or an array of elements";s:11:"description";s:225:"If 'exp' starts with '@', an attribute value of the specified attribute is returned. If 'exp' is "text()", a child text value is returned. Otherwise, an array of child elements, the tag name of which match 'exp', is returned.";s:14:"return_summary";s:36:"A value found, otherwise 'undefined'";s:7:"returns";s:13:"String||Array";s:7:"private";b:1;}s:32:"dojox.wire.XmlWire._setNodeValue";a:7:{s:9:"prototype";s:18:"dojox.wire.XmlWire";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"node";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:6:"A node";}s:3:"exp";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:35:"An expression for attribute or text";}s:5:"value";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:14:"A value to set";}}s:6:"source";s:408:" if(exp.charAt(0) == '@'){ var attribute = exp.substring(1); if(value){ node.setAttribute(attribute, value); }else{ node.removeAttribute(attribute); } }else if(exp == "text()"){ while(node.firstChild){ node.removeChild(node.firstChild); } if(value){ var text = this._getDocument(node).createTextNode(value); node.appendChild(text); } } // else not supported";s:7:"summary";s:58:"Set an attribute value or a child text value to an element";s:11:"description";s:122:"If 'exp' starts with '@', 'value' is set to the specified attribute. If 'exp' is "text()", 'value' is set to a child text.";s:7:"private";b:1;}s:32:"dojox.wire.XmlWire._getChildNode";a:9:{s:9:"prototype";s:18:"dojox.wire.XmlWire";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"node";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:13:"A parent node";}s:4:"name";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:10:"A tag name";}}s:6:"source";s:445:" var index = 1; var i1 = name.indexOf('['); if(i1 >= 0){ var i2 = name.indexOf(']'); index = name.substring(i1 + 1, i2); name = name.substring(0, i1); } var count = 1; for(var i = 0; i < node.childNodes.length; i++){ var child = node.childNodes[i]; if(child.nodeType === 1 /* ELEMENT_NODE */ && child.nodeName == name){ if(count == index){ return child; //Node } count++; } } return null; //null";s:7:"summary";s:19:"Return a child node";s:11:"description";s:180:"A child element of the tag name specified with 'name' is returned. If 'name' ends with an array index, it is used to pick up the corresponding element from multiple child elements.";s:14:"return_summary";s:12:"A child node";s:7:"returns";s:9:"Node|null";s:7:"private";b:1;}s:31:"dojox.wire.XmlWire._getDocument";a:9:{s:9:"prototype";s:18:"dojox.wire.XmlWire";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"node";a:1:{s:4:"type";s:4:"Node";}}s:6:"source";s:162:" if(node){ return (node.nodeType == 9 /* DOCUMENT_NODE */ ? node : node.ownerDocument); //Document }else{ return dojox.xml.parser.parse(); //Document }";s:7:"summary";s:21:"Return a DOM document";s:11:"description";s:101:"If 'node' is specified, a DOM document of the node is returned. Otherwise, a DOM document is created.";s:14:"return_summary";s:14:"A DOM document";s:7:"returns";s:8:"Document";s:7:"private";b:1;}s:10:"dojox.wire";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}