Get content node (type or sub content object)
180534
public function getNode($type, $content = null, $father = null)
    {
        if (!$content) {
            if ($father) {
                return $this->subContent->findOneBy(array('father' => $father, 'next' => null));
            }

            return $this->contentType->findOneBy(array('type' => $type, 'next' => null));
        }

        if ($father) {
            return $this->subContent->findOneBy(array('father' => $father, 'child' => $content));
        }

        return $this->contentType->findOneBy(array('type' => $type, 'content' => $content));
    }
204451
def get_content_title(self, obj):
        """"""
        return Content.objects.get(id=obj.content.id).title
797891
function getInnerHTML(node) {
	if (!node.children) return '';
	if (!isArray(node.children) && typeof HTMLCollection !== 'undefined' && !(node.children instanceof HTMLCollection)) node.children = [node.children];

	return (isArray(node) && node || (typeof HTMLCollection !== 'undefined' && node.children instanceof HTMLCollection ? [].slice.call(node.children) : node.children)).map(function (child) {
		if ((typeof child === 'undefined' ? 'undefined' : _typeof(child)) !== 'object') {
			return '' + child;
		} else if (isArray(child)) {
			return getInnerHTML(child);
		} else {
			var attributes = [''].concat(Object.keys(child.attributes).map(function (attr) {
				return attr + '="' + child.attributes[attr].value + '"';
			}));
			if (['img', 'link', 'meta', 'input', 'br', 'area', 'base', 'param', 'source', 'hr', 'embed'].indexOf(child.tagName) < 0) {
				return '<' + child.tagName + attributes.join(' ') + '>' + getInnerHTML(child) + '</' + child.tagName + '>';
			} else {
				return '<' + child.tagName + attributes.join(' ') + '/>';
			}
		}
	}).join('');
}
787945
def get_text_node(self, tree, xpath_str):
        """"""
        try:
            text = tree.xpath(xpath_str, namespaces=self.namespaces)[0].text
            return text_type(text) if text else ''
        except IndexError:  # pragma: nocover
            return ''
917135
def _find_content(self, cont_name):
        """"""
        try:
            a = self.content_data[cont_name]
            return a
        except KeyError:
            if self.parent:
                return self.parent._find_content(cont_name)
            else:
                # Fallback for no content (Raise NoContent?)
                return ""
605970
function getContentFromNode(options, node) {
	return new Promise(function (resolve, reject) {
		if (node.tag === 'link') {
			return fs.readFile(normalizePath(node.attrs.href, options.root, options.from), 'utf8', function (err, res) {
				return err ? reject(err) : resolve(res);
			});
		}

		return resolve(node.content);
	});
}
1047411
def get_node(request):
    """"""
    api_major_int = 2 if d1_gmn.app.views.util.is_v2_api(request) else 1
    node_pretty_xml = d1_gmn.app.node.get_pretty_xml(api_major_int)
    return django.http.HttpResponse(node_pretty_xml, d1_common.const.CONTENT_TYPE_XML)
351253
function getcontenttype (obj) {
  var header

  if (typeof obj.getHeader === 'function') {
    // res-like
    header = obj.getHeader('content-type')
  } else if (typeof obj.headers === 'object') {
    // req-like
    header = obj.headers && obj.headers['content-type']
  }

  if (typeof header !== 'string') {
    throw new TypeError('content-type header is missing from object')
  }

  return header
}
710875
function extractTextContent (node) {
    var buf = []
    var textContent
    
    switch (node.nodeType) {
      case 1: // Element node such as <p> or <div>
      case 11: // A DocumentFragment node ( a minimal document object that has no parent)
        node = node.firstChild
        while (node) {
          // Type 7 = a ProcessingInstruction of an XML document such as <?xml-stylesheet ... ?> declaration
          // Type 8 = a Comment node
          if (node.nodeType !== 7 && node.nodeType !== 8) {
            textContent = extractTextContent(node)
            
            if (textContent.length > 0 && buf.length > 0) {
              var previousTextContent = buf[buf.length - 1]
              
              if (textContent[0] !== ' ' && previousTextContent.length > 0 && previousTextContent[previousTextContent.length - 1] !== ' ') {
                buf.push(' ')
              }
            }
            
            buf.push(textContent)
          }
          node = node.nextSibling
        }
        return buf.join('')
      default:
        return node.nodeValue
    }
  }
1296849
static function getObjectIdsInNodeSubTree($node)
    {
        $db = eZDB::instance();
        $nodePath =  $node->attribute( 'path_string' );
        $pathString = " path_string like '$nodePath%' AND ";

        $objectIDArray = $db->arrayQuery( "SELECT
                                           ezcontentobject.id
                                    FROM
                                           ezcontentobject_tree, ezcontentobject
                                    WHERE
                                          $pathString
                                          ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
                                          ezcontentobject_tree.main_node_id=ezcontentobject_tree.node_id" );

        if ( count( $objectIDArray ) == 0 )
            return null;

        $objectSimpleIDArray = array();

        foreach ( $objectIDArray as $objectID )
        {
            $objectSimpleIDArray[] = $objectID['id'];
        }

        return $objectSimpleIDArray;
    }
375443
def content_type(self) -> ContentType:
        """"""
        if self._ctype:
            return self._ctype
        return (ContentType.config if self.parent.config else
                ContentType.nonconfig)
596300
function getTextOfNode(node) {
        var result;
        if (node != null && node.childNodes[0]) {
            result = node.childNodes[0].nodeValue;
        } else if (node != null) {
            result = "";
        }
        return result;
    }
530178
function (node) {
        var parent = node;

        while (parent) {
          if (parent.nodeType === 1 && dom.getContentEditable(parent)) {
            return dom.getContentEditable(parent) === "false" ? parent : node;
          }

          parent = parent.parentNode;
        }

        return node;
      }
834922
def parse_content(node)
      content = if node.children.empty?
        node.content
      else
        parse_nodes(node.children)
      end
    end
1128159
function getContent(node) {
    var text = '', atom;
    for (var i = 0; i<node.childNodes.length; i++) {
      if (node.childNodes[i].nodeType === 1) {
        atom = node.childNodes[i]._bfs_text;
      } else if (node.childNodes[i].nodeType === 3) {
        atom = node.childNodes[i].data;
      } else
        continue;
      if (text.match(/[\t ]+$/) && atom.match(/^[\t ]+/)) {
        text = text.replace(/[\t ]+$/,'') + ' ' + atom.replace(/^[\t ]+/, '');
      } else {
        text = text + atom;
      }
    }
    return text;
  }
816740
function getText(node) {
    if (!node || !node.childNodes) {
        return undefined;
    }
    return node.protectedValue ? node.protectedValue.text : node.textContent;
}
991922
def newTextLen(content, len):
    
    ret = libxml2mod.xmlNewTextLen(content, len)
    if ret is None:raise treeError('xmlNewTextLen() failed')
    return xmlNode(_obj=ret)