lost+found/src/xnode.js
function _nodeToXml (node, wrapped) {
        var
            name = node.localName(),
            attributes = node.attributes(),
            children = node.children(),
            text = node.textContent(),
            idx;
        wrapped.startElement({
            uri: "",
            localName: name,
            qName: name
        }, attributes);
        // Today the XmlConstNode may not have both children and textual content
        if (text) {
            wrapped.characters(text);
        } else {
            for (idx = 0; idx < children.length; ++idx) {
                _nodeToXml(children[idx], wrapped);
            }
        }
        wrapped.endElement();
    }
function _nodeToXml (node, wrapped) {
        var
            name = node.localName(),
            attributes = node.attributes(),
            children = node.children(),
            text = node.textContent(),
            idx;
        wrapped.startElement({
            uri: "",
            localName: name,
            qName: name
        }, attributes);
        // Today the XmlConstNode may not have both children and textual content
        if (text) {
            wrapped.characters(text);
        } else {
            for (idx = 0; idx < children.length; ++idx) {
                _nodeToXml(children[idx], wrapped);
            }
        }
        wrapped.endElement();
    }
function _nodeToXml ( node , wrapped ) { var name = node . localName ( ) , attributes = node . attributes ( ) , children = node . children ( ) , text = node . textContent ( ) , idx ; wrapped . startElement ( { uri : "" , localName : name , qName : name } , attributes ) ; // Today the XmlConstNode may not have both children and textual content if ( text ) { wrapped . characters ( text ) ; } else { for ( idx = 0 ; idx < children . length ; ++ idx ) { _nodeToXml ( children [ idx ] , wrapped ) ; } } wrapped . endElement ( ) ; }
Serialize the node into an gpf.interfaces.IXmlContentHandler

@param {gpf.interfaces.IXmlConstNode} node Node to serialize
@param {gpf.interfaces.wrap(IXmlContentHandler)} wrapped XML Content
Serialize the node into an gpf . interfaces . IXmlContentHandler