|
a/libupnpp/soaphelp.cxx |
|
b/libupnpp/soaphelp.cxx |
|
... |
|
... |
125 |
}
|
125 |
}
|
126 |
*value = it->second;
|
126 |
*value = it->second;
|
127 |
return true;
|
127 |
return true;
|
128 |
}
|
128 |
}
|
129 |
|
129 |
|
|
|
130 |
string SoapArgs::xmlQuote(const string& in)
|
|
|
131 |
{
|
|
|
132 |
string out;
|
|
|
133 |
for (unsigned int i = 0; i < in.size(); i++) {
|
|
|
134 |
switch(in[i]) {
|
|
|
135 |
case '"': out += """;break;
|
|
|
136 |
case '&': out += "&";break;
|
|
|
137 |
case '<': out += "<";break;
|
|
|
138 |
case '>': out += ">";break;
|
|
|
139 |
case '\'': out += "'";break;
|
|
|
140 |
default: out += in[i];
|
|
|
141 |
}
|
|
|
142 |
}
|
|
|
143 |
return out;
|
|
|
144 |
}
|
|
|
145 |
|
130 |
IXML_Document *buildSoapBody(SoapData& data)
|
146 |
IXML_Document *buildSoapBody(SoapData& data)
|
131 |
{
|
147 |
{
|
132 |
IXML_Document *doc = ixmlDocument_createDocument();
|
148 |
IXML_Document *doc = ixmlDocument_createDocument();
|
133 |
if (doc == 0) {
|
149 |
if (doc == 0) {
|
134 |
cerr << "buildSoapResponse: out of memory" << endl;
|
150 |
cerr << "buildSoapResponse: out of memory" << endl;
|
|
... |
|
... |
151 |
|
167 |
|
152 |
ixmlNode_appendChild((IXML_Node*)doc,(IXML_Node*)top);
|
168 |
ixmlNode_appendChild((IXML_Node*)doc,(IXML_Node*)top);
|
153 |
|
169 |
|
154 |
return doc;
|
170 |
return doc;
|
155 |
}
|
171 |
}
|
|
|
172 |
|