Returns the XML file read as a string.
346430
public String asString() throws IOException {
        StringWriter w = new StringWriter();
        writeRawTo(w);
        return w.toString();
    }
1008826
def to_xml_string(str = '')
      str << '<xdr:twoCellAnchor>'
      str << '<xdr:from>'
      from.to_xml_string str
      str << '</xdr:from>'
      str << '<xdr:to>'
      to.to_xml_string str
      str << '</xdr:to>'
      object.to_xml_string(str)
      str << '<xdr:clientData/>'
      str << '</xdr:twoCellAnchor>'
    end
1020926
def to_xml_string(str = '')
      str << '<c:catAx>'
      super(str)
      str << ('<c:auto val="' << @auto.to_s << '"/>')
      str << ('<c:lblAlgn val="' << @lbl_algn.to_s << '"/>')
      str << ('<c:lblOffset val="' << @lbl_offset.to_i.to_s << '"/>')
      str << ('<c:tickLblSkip val="' << @tick_lbl_skip.to_s << '"/>')
      str << ('<c:tickMarkSkip val="' << @tick_mark_skip.to_s << '"/>')
      str << '</c:catAx>'
    end
102488
public static Document readXML(File file) {
		Assert.notNull(file, "Xml file is null !");
		if (false == file.exists()) {
			throw new UtilException("File [{}] not a exist!", file.getAbsolutePath());
		}
		if (false == file.isFile()) {
			throw new UtilException("[{}] not a file!", file.getAbsolutePath());
		}

		try {
			file = file.getCanonicalFile();
		} catch (IOException e) {
			// ignore
		}

		BufferedInputStream in = null;
		try {
			in = FileUtil.getInputStream(file);
			return readXML(in);
		} finally {
			IoUtil.close(in);
		}
	}
1173693
def tostring(self):
        """"""
        parser = etree.XMLParser(remove_blank_text=True)
        outputtree = etree.XML(etree.tostring(self.__doc), parser)
        return etree.tostring(outputtree, pretty_print=True)
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
237772
public StringBuffer readFile(String filename) throws IOException {
		BufferedReader reader = new BufferedReader(new FileReader(filename));
		StringBuffer xml = new StringBuffer();
		String line = null;
        while((line = reader.readLine()) != null){
            xml.append(line);
        }
		reader.close();
		return xml;
	}
329369
def raw_xml(self) -> _RawXML:
        
        if self._xml:
            return self._xml
        else:
            return etree.tostring(self.element, encoding='unicode').strip().encode(self.encoding)
764316
def xml_to_str(tree, encoding=None, xml_declaration=False):
    """"""
    if xml_declaration and not encoding:
        raise ValueError("'xml_declaration' is not supported when 'encoding' is None")
    if encoding:
        return tostring(tree, encoding=encoding, xml_declaration=True)
    return tostring(tree, encoding=text_type, xml_declaration=False)
861650
function xmlString( )
    {
        $doc = new DOMDocument( '1.0', 'utf-8' );

        $root = $doc->createElement( "ezrangeoption" );
        $root->setAttribute( "start_value", $this->StartValue );
        $root->setAttribute( "stop_value", $this->StopValue );
        $root->setAttribute( "step_value", $this->StepValue );
        $doc->appendChild( $root );

        $name = $doc->createElement( "name", $this->Name );
        $root->appendChild( $name );

        $xml = $doc->saveXML();

        return $xml;
    }
637472
def read_xml(self):
        
        if self.xml_uri is None:
            root = self._read_xml_db()
        else:
            root = self._read_xml_file()
        if root is not None:
            for name, path in list(self._standard_properties.items()):
                value = read_property_from_xml(root, path)
                if value is not None:
                    # this calls the default setters
                    setattr(self, name, value)

        return root
920030
def toxml(self):
        

        xmlstr = '<OnStart'

        chxmlstr = ''

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

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

        return xmlstr
231718
def get_content_string(self):
        
        return ''.join([ET.tostring(element, encoding="utf-8", method="xml")
                        for element in list(self._content)])
1347806
public function readXMLString() {

            $strref = $this->readU29();

            $strlen = $strref >> 1; 
            $str = $this->stream->readBuffer($strlen);
            return simplexml_load_string($str);

        }
516090
def read_xml(filename):
    
    parser = et.XMLParser(remove_blank_text=True)
    isfile=False
    try:
        isfile = os.path.exists(filename)
    except ValueError as e:
        if 'path too long for Windows' in str(e):
            pass
        else:
            raise
    try:
        if isfile:
            return et.parse(filename, parser)
        else:
            r = et.fromstring(filename, parser)
            return r.getroottree()
    except IOError:
        log.exception('unable to open file [[}]'.format(filename))
    except et.XMLSyntaxError:
        log.exception('unable to parse XML [{}]'.format(filename))
        return None
    return None
709892
def to_xml_string(str = '')
      str << '<c:tx>'
      str << '<c:strRef>'
      str << ('<c:f>' << Axlsx::cell_range([@cell]) << '</c:f>')
      str << '<c:strCache>'
      str << '<c:ptCount val="1"/>'
      str << '<c:pt idx="0">'
      str << ('<c:v>' << @text << '</c:v>')
      str << '</c:pt>'
      str << '</c:strCache>'
      str << '</c:strRef>'
      str << '</c:tx>'
    end
1186521
def get_xml_str(self, data):
        

        responses = []
        for tag, value in data.items():
            elem = Element(tag)
            if isinstance(value, dict):
                for value in self.get_xml_str(value):
                    elem.append(value)
            elif isinstance(value, list):
                value = ', '.join([m for m in value])
                elem.text = value
            else:
                elem.text = value
            responses.append(elem)
        return responses