pvserver.js
function(operation, parameters) {
    var req;

    req = getXmlReqHeader.call(this);
    req.push('<Operation><Name>', operation, '</Name>', '<Params>');
    if (parameters) {
        // don't send raw '&', but don't change '&amp;', '&lt;', etc.
        req.push(
            parameters.replace(/&/g, "&amp;")
            .replace(/&amp;(amp|lt|gt|quot);/g, "&$1;")
        );
    }
    req.push('</Params></Operation></PVRequest>');

    return req.join('');
}
function(operation, parameters) {
    var req;

    req = getXmlReqHeader.call(this);
    req.push('<Operation><Name>', operation, '</Name>', '<Params>');
    if (parameters) {
        // don't send raw '&', but don't change '&amp;', '&lt;', etc.
        req.push(
            parameters.replace(/&/g, "&amp;")
            .replace(/&amp;(amp|lt|gt|quot);/g, "&$1;")
        );
    }
    req.push('</Params></Operation></PVRequest>');

    return req.join('');
}
function ( operation , parameters ) { var req ; req = getXmlReqHeader . call ( this ) ; req . push ( '<Operation><Name>' , operation , '</Name>' , '<Params>' ) ; if ( parameters ) { // don't send raw '&', but don't change '&amp;', '&lt;', etc. req . push ( parameters . replace ( / & / g , "&amp;" ) . replace ( / &amp;(amp|lt|gt|quot); / g , "&$1;" ) ) ; } req . push ( '</Params></Operation></PVRequest>' ) ; return req . join ( '' ) ; }
Create an XML request string for the RPM API, note that the parameters are in XML.
Create an XML request string for the RPM API note that the parameters are in XML .