Return XHTML content of a page.
    Parameters:
    - id: id of a Confluence page.
518495
def get_page_content(id):
    
    data = _json.loads(_api.rest("/" + str(id) + "?expand=body.storage"))
    return data["body"]["storage"]["value"]
1129957
def get_document(self, id):
        
        obj_list = self.document_list
        matches = [i for i in obj_list if str(i.id) == str(id)]
        if not matches:
            raise DoesNotExistError("The resource you've requested does not \
exist or is unavailable without the proper credentials.")
        return matches[0]
621229
def show
      if params[:id]
        @content = Content.find(params[:id])
      elsif params[:element_id] && params[:name]
        @content = Content.find_by!(element_id: params[:element_id], name: params[:name])
      end
      authorize! :show, @content
      respond_with @content
    end
1252546
private Document cmisContent( String id ) {
        DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.CONTENT, id));

        org.apache.chemistry.opencmis.client.api.Document doc = (org.apache.chemistry.opencmis.client.api.Document)session.getObject(id);
        writer.setPrimaryType(NodeType.NT_RESOURCE);
        writer.setParent(id);

        ContentStream contentStream = doc.getContentStream();
        if (contentStream != null) {
            BinaryValue content = new CmisConnectorBinary(contentStream, getSourceName(), id, getMimeTypeDetector());
            writer.addProperty(JcrConstants.JCR_DATA, content);
            writer.addProperty(JcrConstants.JCR_MIME_TYPE, contentStream.getMimeType());
        }

        Property<Object> lastModified = doc.getProperty(PropertyIds.LAST_MODIFICATION_DATE);
        Property<Object> lastModifiedBy = doc.getProperty(PropertyIds.LAST_MODIFIED_BY);

        writer.addProperty(JcrLexicon.LAST_MODIFIED, properties.jcrValues(lastModified));
        writer.addProperty(JcrLexicon.LAST_MODIFIED_BY, properties.jcrValues(lastModifiedBy));

        return writer.document();
    }
530312
def is_page_content_is_already_updated(self, page_id, body):
        
        confluence_content = (self.get_page_by_id(page_id, expand='body.storage').get('body') or {}).get('storage').get(
            'value')
        confluence_content = confluence_content.replace('&oacute;', u'ó')

        log.debug('Old Content: """{body}"""'.format(body=confluence_content))
        log.debug('New Content: """{body}"""'.format(body=body))

        if confluence_content == body:
            log.warning('Content of {page_id} is exactly the same'.format(page_id=page_id))
            return True
        else:
            log.info('Content of {page_id} differs'.format(page_id=page_id))
            return False
1121948
function getElementById(id) {
		var el = null;
		try {
			el = doc.getElementById(id);
		}
		catch (e) {}
		return el;
	}
510868
public function getContentById($id)
    {
        return $this->om->getRepository($this->configurationManager->getEntityClass('content'))->find($id);
    }
194176
def html(self):
    '''
    
    '''

    if not getattr(self, '_html', False):
      query_params = {
        'prop': 'revisions',
        'rvprop': 'content',
        'rvlimit': 1,
        'rvparse': '',
        'titles': self.title
      }

      request = _wiki_request(query_params)
      self._html = request['query']['pages'][self.pageid]['revisions'][0]['*']

    return self._html
34701
def get_all_page_ids_from_space(confluence, space_key):
    
    limit = 500
    flag = True
    step = 0
    page_ids = []

    while flag:
        values = confluence.get_all_pages_from_space(space=space_key, start=limit * step, limit=limit)
        step += 1
        if len(values) == 0:
            flag = False
            print("Did not find any pages, please, check permissions")
        else:
            for value in values:
                print("Retrieve page with title: " + value['title'])
                page_ids.append((value['id']))
    print("Found in space {} pages {}".format(space_key, len(page_ids)))
    return page_ids
823794
def get_page(self, page_id):
        
        try:
            result = self._request('/getpage/',
                                   {'pageid': page_id})
            return TildaPage(**result)
        except NetworkError:
            return []
1140860
def get(self, id):
        
        url = self._url('%s' % (id))
        return self.client.get(url)
558097
def getElementById(self, id: str) -> Optional[Node]:
        
        elm = getElementById(id)
        if elm and elm.ownerDocument is self:
            return elm
        return None
754034
def _extract_notebook_text(self, element_id):
        
        headers = self._auth_headers_with_json()
        data = {'courseId': self._course_id,
                'learnerId': self._user_id, 'itemId': element_id}
        dom = get_page(self._session, OPENCOURSE_NOTEBOOK_LAUNCHES,
                       post=True,
                       json=True,
                       user_id=self._user_id,
                       course_id=self._course_id,
                       headers=headers,
                       element_id=element_id,
                       data=json.dumps(data)
                       )

        # Return authorization id. This id changes on each request
        return dom['elements'][0]['authorizationId']
303791
function (id) {
            var description = this._requests[id];
            if (!description) {
                // The request was aborted
                return;
            }
            var request = description.request;
            var callback = description.cb;

            var iFrame = request.iFrame;
            var responseText, contentDocument = iFrame.contentDocument, contentWindow;

            if (contentDocument == null) {
                var contentWindow = iFrame.contentWindow;
                if (contentWindow) {
                    contentDocument = contentWindow.document;
                }
            }
            if (contentDocument) {
                var body = contentDocument.body || contentDocument.documentElement;
                if (body) {
                    // this is for content displayed as text:
                    responseText = body.textContent || body.outerText;
                }
                var xmlDoc = contentDocument.XMLDocument;
                // In IE, contentDocument contains a transformation of the document
                // see: http://www.aspnet-answers.com/microsoft/JScript/29847637/javascript-ie-xml.aspx
                if (xmlDoc) {
                    contentDocument = xmlDoc;
                }
            }

            this._deleteRequest(request);

            var response = {
                status : 200,
                responseText : responseText,
                responseXML : contentDocument
            };

            callback.fn.call(callback.scope, false, callback.args, response);
        }
897678
public static function setHTML($id, $html)
    {
        $js = '$("'.$id.'").html('.json_encode($html).');';
        return self::execHeader($js);
    }
1231116
def parse_navigation_html_to_tree(html, id):
    
    def xpath(x):
        return html.xpath(x, namespaces=HTML_DOCUMENT_NAMESPACES)
    try:
        value = xpath('//*[@data-type="binding"]/@data-value')[0]
        is_translucent = value == 'translucent'
    except IndexError:
        is_translucent = False
    if is_translucent:
        id = TRANSLUCENT_BINDER_ID
    tree = {'id': id,
            'title': xpath('//*[@data-type="document-title"]/text()')[0],
            'contents': [x for x in _nav_to_tree(xpath('//xhtml:nav')[0])]
            }
    return tree
641009
def content(self, request, id):
        
        gist = self.send(request, id).json()

        def convert(data):
            return base64.b64decode(data).decode('utf-8')

        content = {}
        for name, data in gist['files'].items():
            content[name] = convert(data['content'])

        return content