Returns a `QTextDocument <http://doc.qt.nokia.com/qtextdocument.html>`_ class instance
        with given content.

        :return: Document.
        :rtype: QTextDocument
194646
def __get_document(self, content):
        

        document = QTextDocument(QString(content))
        document.clearUndoRedoStacks()
        document.setModified(False)
        return document
197552
def doc(self):
        """"""
        if hasattr(self, '_doc'):
            return self._doc
        elements = self.etree
        doc = self._doc = PyQuery(elements)
        doc.make_links_absolute(utils.text(self.url))
        return doc
606635
def document(self):
        """"""
        resp = request.environ.get('pylons.original_response')
        content = literal(resp.body) or cgi.escape(request.GET.get('message'))
        page = error_document_template % \
            dict(prefix=request.environ.get('SCRIPT_NAME', ''),
                 code=cgi.escape(request.GET.get('code', str(resp.status_int))),
                 message=content)
        return page
560299
def documento(self, *args, **kwargs):
        
        forcar_unicode = kwargs.pop('forcar_unicode', False)
        incluir_xml_decl = kwargs.pop('incluir_xml_decl', True)
        doc = ET.tostring(self._xml(*args, **kwargs),
                encoding='utf-8').decode('utf-8')
        if forcar_unicode:
            if incluir_xml_decl:
                doc = u'{}\n{}'.format(constantes.XML_DECL_UNICODE, doc)
        else:
            if incluir_xml_decl:
                doc = '{}\n{}'.format(constantes.XML_DECL, unidecode(doc))
            else:
                doc = unidecode(doc)
        return doc
467952
public JQMContent createContent() {
        JQMContent content = new JQMContent();
        Element elt = getElement();
        add(content, elt);
        return content;
    }
1283832
def get_data(self):
        
        try:
            return DocumentDataDict(self.__dict__['data'])
        except KeyError:
            self._lazy_load()
            return DocumentDataDict(self.__dict__['data'])
447655
def get(self, document=None, plugin=None):
        
        if plugin is not None:
            if document is None:
                documents_list = {}
                for key in self.documents.keys():
                    if self.documents[key].plugin == plugin:
                        documents_list[key] = self.documents[key]
                return documents_list
            else:
                if document in self.documents.keys():
                    if self.documents[document].plugin == plugin:
                        return self.documents[document]
                    else:
                        return None
                else:
                    return None
        else:
            if document is None:
                return self.documents
            else:
                if document in self.documents.keys():
                    return self.documents[document]
                else:
                    return None
391169
def get_input_document(document):
    """"""
    try:
        if document.SUBCLASS_OF_ID == 0xf33fdb68:  # crc32(b'InputDocument'):
            return document
    except AttributeError:
        _raise_cast_fail(document, 'InputDocument')

    if isinstance(document, types.Document):
        return types.InputDocument(
            id=document.id, access_hash=document.access_hash,
            file_reference=document.file_reference)

    if isinstance(document, types.DocumentEmpty):
        return types.InputDocumentEmpty()

    if isinstance(document, types.MessageMediaDocument):
        return get_input_document(document.document)

    if isinstance(document, types.Message):
        return get_input_document(document.media)

    _raise_cast_fail(document, 'InputDocument')
392267
def contextDoc(self):
        
        ret = libxml2mod.xmlXPathGetContextDoc(self._o)
        if ret is None:raise xpathError('xmlXPathGetContextDoc() failed')
        __tmp = xmlDoc(_obj=ret)
        return __tmp
446797
def getdocumenttext(document):
    ''''''
    paratextlist = []
    # Compile a list of all paragraph (p) elements
    paralist = []
    for element in document.iter():
        # Find p (paragraph) elements
        if element.tag == '{'+nsprefixes['w']+'}p':
            paralist.append(element)
    # Since a single sentence might be spread over multiple text elements,
    # iterate through each paragraph, appending all text (t) children to that
    # paragraphs text.
    for para in paralist:
        paratext = u''
        # Loop through each paragraph
        for element in para.iter():
            # Find t (text) elements
            if element.tag == '{'+nsprefixes['w']+'}t':
                if element.text:
                    paratext = paratext+element.text
            elif element.tag == '{'+nsprefixes['w']+'}tab':
                paratext = paratext + '\t'
        # Add our completed paragraph text to the list of paragraph text
        if not len(paratext) == 0:
            paratextlist.append(paratext)
    return paratextlist
1262692
def make_str_content(content):
    
    if not isinstance(content, str):
        content = str(content.decode())
    return content
713213
def validateDocument(self, doc):
        
        if doc is None: doc__o = None
        else: doc__o = doc._o
        ret = libxml2mod.xmlValidateDocument(self._o, doc__o)
        return ret
82159
def dict_to_instance(self, content):
        
        klass = self.schema['title']
        cls = get_model_class(klass, api=self.__api__)
        # jdict = json.loads(content, encoding="utf-8")
        ### check if we have a response
        properties_dict = content[self.schema['title']][self.schema['title']]
        #@todo: find a way to handle the data
        # validation fails if the none values are not removed
        new_dict = helpers.remove_properties_containing_None(properties_dict)
        obj = cls(new_dict)
        #obj.links = content[self.schema['title']]['links']
        return obj
807468
public static String getContentByDoc(Document doc) throws Exception {
        ContentExtractor ce = new ContentExtractor(doc);
        return ce.getContentElement().text();
    }
48109
def get_content_dict(vocabularies, content_vocab):
    
    # Raise exception if the vocabulary can't be found.
    if vocabularies.get(content_vocab, None) is None:
        raise UNTLFormException(
            'Could not retrieve content vocabulary "%s" for the form.'
            % (content_vocab)
        )
    else:
        # Return the sorted vocabulary.
        return vocabularies.get(content_vocab)
1041226
def get_text(self):
        
        if self._multiline: return str(self._widget.toPlainText())
        else:               return str(self._widget.text())
161380
def get_description(cls) -> str:
        
        if cls.__doc__ is None:
            raise ValueError('No docstring found for {}'.format(cls.__name__))
        return cls.__doc__.strip()