Accepts xmlQuery String and returns xml response String. No object manipulation is done in this method.
12851
def XmlRawQuery(self, xml, dumpXml=None):
		

		if (dumpXml == None):
			dumpXml = self._dumpXml

		uri = self.Uri() + '/nuova'
		if (dumpXml in _AffirmativeList):
			print '%s ====> %s' % (self._ucs, xml)
		# req = urllib2.Request(url=uri,data=xml)
		# f = urllib2.urlopen(req)
		w = xml.dom.minidom.Document()

		if (self._noSsl):
			req = urllib2.Request(url=uri, data=w.toxml())
			opener = urllib2.build_opener(SmartRedirectHandler())
			f = opener.open(req)
			# print "##", f , "##"

			if type(f) is list:
				if (len(f) == 2 and f[0] == 302):
					# self._noSsl = False
					# uri = self.Uri() + '/nuova'
					uri = f[1]
					req = urllib2.Request(url=uri, data=w.toxml())
					f = urllib2.urlopen(req)
				# print "status code is:",f[0]
				# print "location is:", f[1]
		else:
			req = urllib2.Request(url=uri, data=w.toxml())
			f = urllib2.urlopen(req)

		rsp = f.read()
		if (dumpXml in _AffirmativeList):
			print '%s <==== %s' % (self._ucs, rsp)
		return rsp
306075
public static String serialize(String xmlString) {
        StringWriter sw = new StringWriter();
        serialize(asStreamSource(xmlString), sw);
        return sw.toString();
    }
573583
public static Set<String> postQuery(String xml)
			throws IOException{

		//System.out.println(xml);


		URL u = new URL(SERVICELOCATION);


		String encodedXML = URLEncoder.encode(xml,"UTF-8");


		InputStream in =  doPOST(u,encodedXML);

		Set<String> pdbIds = new TreeSet<String>();


		try (BufferedReader rd = new BufferedReader(new InputStreamReader(in))) {

			String line;
			while ((line = rd.readLine()) != null) {

				pdbIds.add(line);

			}
			rd.close();
		}


		return pdbIds;



	}
1219972
public String toXmlString() throws TransformerException {
        if (doc == null) {
            return null;
        }
        final DOMSource domSource = new DOMSource(doc);
        final StringWriter writer = new StringWriter();
        final StreamResult result = new StreamResult(writer);
        final TransformerFactory tf = TransformerFactory.newInstance();
        tf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
        final Transformer transformer = tf.newTransformer();
        transformer.setOutputProperty(OutputKeys.ENCODING, StandardCharsets.UTF_8.name());
        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
        transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "yes");
        transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
        transformer.transform(domSource, result);

        return writer.toString();
    }
933554
public static <T> T executeXmlResult(HttpUriRequest request,Class<T> clazz){
		return execute(request,XmlResponseHandler.createResponseHandler(clazz));
	}
1138089
def _normalize_xml_search_response(self, xml):
        
        target = XMLSearchResult()
        parser = ElementTree.XMLParser(target=target)
        parser.feed(xml)
        return parser.close()
301759
def getQueryRequestXML( query = nil, qid = nil, qname = nil )
      @query = @qid = @qname = nil
      if query
        @query = query == "" ? "{'0'.CT.''}" : query
        xmlRequestData = toXML( :query, @query )
      elsif qid
        @qid = qid
        xmlRequestData = toXML( :qid, @qid )
      elsif qname
        @qname = qname
        xmlRequestData = toXML( :qname, @qname )
      else
        @query = "{'0'.CT.''}"
        xmlRequestData = toXML( :query, @query )
      end
      xmlRequestData
   end
351822
def to_xml_string(str = '')
      return if empty?
      str << '<definedNames>'
      each { |defined_name| defined_name.to_xml_string(str) }
      str << '</definedNames>'
    end
244058
def get_xml(self):
        
        with io.StringIO() as string:
            string.write(ET.tostring(self.root, encoding="unicode"))
            return string.getvalue()
648608
def to_xml_string(str='')
      return unless range
      str << "<autoFilter ref='#{range}'>"
      columns.each { |filter_column| filter_column.to_xml_string(str) }
      str << "</autoFilter>"
    end
852066
public Xml read(String xmlPathQuery, boolean captureContent) {
        XmlPath xmlPath = XmlPathParser.parse(xmlPathQuery);
        Xml doc = new Xml();
        boolean record = false;
        int levelIndex = 0;

        XmlNode node;
        while((node = pullXmlNode()) != null) {
            if(node instanceof XmlStartElement) {
                XmlStartElement startElement = (XmlStartElement) node;
                Element element = new Element(startElement.getLocalName());
                element.addAttributes(startElement.getAttributes());
                currentPath.addLast(element);
                if(xmlPath.matches(currentPath)) {
                    if(!captureContent) {
                        // capture single element only
                        doc.addElement(element);
                        return doc;
                    }
                    // turn on document builder
                    record = true;
                }
                if(record) {
                    // build document
                    doc.addElement(element);
                    levelIndex += 1;
                }
            } else if(node instanceof XmlEndElement) {
                if(xmlPath.isSimplePattern() && levelIndex == 0) {
                    // a simple pattern query can not read further up
                    nodeQueue.push(node);
                    return null;
                }
                if(currentPath.getLast() instanceof Content) {
                    currentPath.removeLast();
                }
                currentPath.removeLast();
                if(record) {
                    // build document
                    doc.endElement();
                    levelIndex -= 1;
                    if(levelIndex == 0) {
                        return doc;
                    }
                }
            } else if(node instanceof XmlContent) {
                XmlContent content = (XmlContent) node;
                if(currentPath.getLast() instanceof Content) {
                    currentPath.removeLast();
                }
                currentPath.addLast(new Content(content.getText()));
                if(record) {
                    // build document
                    doc.addContent(new Content(content.getText()));
                }
            } else {
                // don't know how to handle this type, internal error
                throw new XmlReaderException("Unknown XmlNode type: " + node);
            }
        }
        // no element was found matching the query
        return null;
    }
1298300
def XML_fromstring(content, source=None):
    
    try:
        tree = ET.fromstring(content)
    except ET.ParseError as err:
        x_parse_error(err, content, source)
    return tree
1273956
public static Map<String, String> xmlToMap(String xmlStr) {
		XmlHelper xmlHelper = XmlHelper.of(xmlStr);
		return xmlHelper.toMap();
	}
932482
def to_string(xml, **kwargs):
        

        if isinstance(xml, OneLogin_Saml2_XML._text_class):
            return xml

        if isinstance(xml, OneLogin_Saml2_XML._element_class):
            OneLogin_Saml2_XML.cleanup_namespaces(xml)
            return OneLogin_Saml2_XML._unparse_etree(xml, **kwargs)

        raise ValueError("unsupported type %r" % type(xml))
920030
def toxml(self):
        

        xmlstr = '<OnStart'

        chxmlstr = ''

        for action in self.actions:
            chxmlstr += action.toxml()

        if chxmlstr:
            xmlstr += '>' + chxmlstr + '</OnStart>'
        else:
            xmlstr += '/>'

        return xmlstr
1255261
def _handle_response(response, **kwargs) -> XMLResponse:
        
        if not response.encoding:
            response.encoding = DEFAULT_ENCODING

        return response
917280
def to_xml_string(str='')
      return if empty?
      str << '<hyperlinks>'
      each { |hyperlink| hyperlink.to_xml_string(str) }
      str << '</hyperlinks>'
    end