parse the html string from DOM Node

@param  {DOM Node} node
@return {String}
17466
function( node ){
			var out = '',
				j = 0;

			// we do not want the outer container
			if(node.childNodes && node.childNodes.length > 0){
				for (j = 0; j < node.childNodes.length; j++) {
					var text = this.walkTreeForHtml( node.childNodes[j] );
					if(text !== undefined){
						out += text;
					}
				}
			}

			return out;
		}
709530
function inspectNode(node) {
            if (!node) {
                return "[No node]";
            }
            if (crashyTextNodes && isBrokenNode(node)) {
                return "[Broken node]";
            }
            if (isCharacterDataNode(node)) {
                return '"' + node.data + '"';
            }
            if (node.nodeType == 1) {
                var idAttr = node.id ? ' id="' + node.id + '"' : "";
                return "<" + node.nodeName + idAttr + ">[index:" + getNodeIndex(node) + ",length:" + node.childNodes.length + "][" + (node.innerHTML || "[innerHTML not supported]").slice(0, 25) + "]";
            }
            return node.nodeName;
        }
1083131
def parse_Element(self, node):
        
        name = node.tagName
        ignores = self.ignores
        if name in ignores:
            return
        attr = "do_%s" % name
        if hasattr(self, attr):
            handlerMethod = getattr(self, attr)
            handlerMethod(node)
        else:
            self.generic_parse(node)
239734
function html($node, isNewlineOnBlock) {
  let markup = value($node);

  if (isNewlineOnBlock) {
    const regexTag = /<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g;
    markup = markup.replace(regexTag, function(match, endSlash, name) {
      name = name.toUpperCase();
      const isEndOfInlineContainer = /^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(name) &&
                                   !!endSlash;
      const isBlockNode = /^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);

      return match + ((isEndOfInlineContainer || isBlockNode) ? '\n' : '');
    });
    markup = markup.trim();
  }

  return markup;
}
531751
function (dom) {
            var html = '';
            dom.forEach(function (node) {
                if (node.type === 'tag') {
                    var tag = node.name;
                    html += '<' + tag;
                    Object.keys(node.attribs).forEach(function (attr) {
                        html += ' ' + attr + '=' + this.generateAttribute(node.attribs[attr]);
                    }, this);
                    html += (voidTags[tag] ? '/>' : '>');
                    if (!voidTags[tag]) {
                        html += this.vdomToHtml(node.children);
                        html += '</' + tag + '>';
                    }
                } else if (node.type === 'text') {
                    var text = node.data || '';
                    html += this.htmlEncode(text); //escape <,> and &.
                } else if (node.type === 'comment') {
                    html += '<!-- ' + node.data.trim() + ' -->';
                } else if (node.type === 'script' || node.type === 'style') {
                    //No need to escape text inside script or style tag.
                    html += '<' + node.name;
                    Object.keys(node.attribs).forEach(function (attr) {
                        html += ' ' + attr + '=' + this.generateAttribute(node.attribs[attr]);
                    }, this);
                    html += '>' + ((node.children[0] || {}).data || '') + '</' + node.name + '>';
                } else if (node.type === 'directive') {
                    html += '<' + node.data + '>';
                }
            }, this);
            return html;
        }
1175568
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'dPr'
          node_child.xpath('*').each do |node_child_child|
            case node_child_child.name
            when 'begChr'
              @begin_character = ValuedChild.new(:string, parent: self).parse(node_child_child)
            when 'endChr'
              @end_character = ValuedChild.new(:string, parent: self).parse(node_child_child)
            end
          end
        end
      end
      @value = DocxFormula.new(parent: self).parse(node)
      self
    end
528498
public static String getNodeText(Node<?> node, InputBuffer inputBuffer) {
        checkArgNotNull(node, "node");
        checkArgNotNull(inputBuffer, "inputBuffer");
        if (node.hasError()) {
            // if the node has a parse error we cannot simply cut a string out of the underlying input buffer, since we
            // would also include illegal characters, so we need to build it constructively
            StringBuilder sb = new StringBuilder();
            for (int i = node.getStartIndex(); i < node.getEndIndex(); i++) {
                char c = inputBuffer.charAt(i);
                switch (c) {
                    case Chars.DEL_ERROR:
                        i++;
                        break;
                    case Chars.INS_ERROR:
                    case Chars.EOI:
                        break;
                    case Chars.RESYNC_START:
                        i++;
                        while (inputBuffer.charAt(i) != Chars.RESYNC_END) i++;
                        break;
                    case Chars.RESYNC_END:
                    case Chars.RESYNC_EOI:
                    case Chars.RESYNC:
                        // we should only see proper RESYNC_START / RESYNC_END blocks
                        throw new IllegalStateException();
                    default:
                        sb.append(c);
                }
            }
            return sb.toString();
        }        
        return inputBuffer.extract(node.getStartIndex(), node.getEndIndex());
    }
957707
def parse(node)
      @id = node.attribute('id').value
      @action = node.attribute('action').value
      node.xpath('*').each do |hyperlink_for_hover_node_child|
        case hyperlink_for_hover_node_child.name
        when 'snd'
          @sound = Sound.new(parent: self).parse(hyperlink_for_hover_node_child)
        end
      end
      self
    end
884604
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'tx'
          node_child.xpath('c:rich/*').each do |rich_node_child|
            case rich_node_child.name
            when 'p'
              root_object.default_font_style = FontStyle.new(true) # Default font style for chart title always bold
              @elements << Paragraph.new(parent: self).parse(rich_node_child)
              root_object.default_font_style = FontStyle.new
            end
          end
        when 'layout'
          @layout = option_enabled?(node_child)
        when 'overlay'
          @overlay = option_enabled?(node_child)
        end
      end
      self
    end
90245
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'blipFill'
          @type = :picture
          @value = DocxBlip.new(parent: self).parse(node_child)
          node_child.xpath('*').each do |fill_type_node_child|
            case fill_type_node_child.name
            when 'tile'
              @stretching_type = :tile
            when 'stretch'
              @stretching_type = :stretch
            when 'blip'
              fill_type_node_child.xpath('alphaModFix').each { |alpha_node| @alpha = alpha_node.attribute('amt').value.to_i / 1_000.0 }
            end
          end
        when 'solidFill'
          @type = :solid
          @value = Color.new(parent: self).parse_color_model(node_child)
        when 'gradFill'
          @type = :gradient
          @value = GradientColor.new(parent: self).parse(node_child)
        when 'pattFill'
          @type = :pattern
          @value = DocxPatternFill.new(parent: self).parse(node_child)
        end
      end
      self
    end
422994
function stringifyNode(node)
{
	var result = "<"+node.nodeName;
	var numAttrs = node.attrs.length;
	
	for (var i=0; i<numAttrs; i++)
	{
		result += " "+ node.attrs[i].name +'="'+ node.attrs[i].value +'"';
	}
	
	result += ">";
	
	return result;
}
73373
function fromHTML(html) {
                var div = document.createElement('div');
                div.innerHTML = html;
                return div.childNodes;
            }
261820
function( node ) {
			var out = '',
				j = 0;

			// if node is a text node get its text
			if(node.nodeType && node.nodeType === 3){
				//out += modules.domUtils.getElementText( node );
				var containerNode = modules.domUtils.createNode('div');
				modules.domUtils.appendChild(containerNode, modules.domUtils.clone(node));
				out += modules.domUtils.innerHTML(containerNode);
			}


			// exclude text which has been added with include pattern  -
			if(node.nodeType && node.nodeType === 1 && modules.domUtils.hasAttribute(node, 'data-include') === false){

				// begin tag
				out += '<' + node.tagName.toLowerCase();

				// add attributes
				var attrs = modules.domUtils.getOrderedAttributes(node);
				for (j = 0; j < attrs.length; j++) {
					out += ' ' + attrs[j].name +  '=' + '"' + attrs[j].value + '"';
				}

				if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) === -1){
					out += '>';
				}

				// get the text of the child nodes
				if(node.childNodes && node.childNodes.length > 0){

					for (j = 0; j < node.childNodes.length; j++) {
						var text = this.walkTreeForHtml( node.childNodes[j] );
						if(text !== undefined){
							out += text;
						}
					}
				}

				// end tag
				if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) > -1){
					out += ' />';
				}else{
					out += '</' + node.tagName.toLowerCase() + '>';
				}
			}

			return (out === '')? undefined : out;
		}
462267
protected void parse(Node node) {
		parsed = true;
		NodeList childNodes = node.getChildNodes();
		for (int i = 0; i < childNodes.getLength(); i++) {
			Node child = childNodes.item(i);
			String nodeName = child.getNodeName();
			if ("Name".equalsIgnoreCase(nodeName)) {
				name = getValueRecursive(child);
			} else if ("Title".equalsIgnoreCase(nodeName)) {
				title = getValueRecursive(child);
			} else if ("Abstract".equalsIgnoreCase(nodeName)) {
				abstractt = getValueRecursive(child);
			} else if ("Keywords".equalsIgnoreCase(nodeName)) {
				addKeyWords(child);
			} else if ("SRS".equalsIgnoreCase(nodeName)) {
				defaultCrs = getValueRecursive(child);
			} else if ("LatLongBoundingBox".equalsIgnoreCase(nodeName)) {
				addLatLonBoundingBox(child);
			}
		}
	}
1058427
function(node) {
        var attributes = {};
        var i, len, data, key;
        var dataNodes = node.getElementsByTagName("Data");
        for (i = 0, len = dataNodes.length; i < len; i++) {
            data = dataNodes[i];
            key = data.getAttribute("name");
            var ed = {};
            var valueNode = data.getElementsByTagName("value");
            if (valueNode.length) {
                ed['value'] = this.getChildValue(valueNode[0]);
            }
            if (this.kvpAttributes) {
                attributes[key] = ed['value'];
            } else {
                var nameNode = data.getElementsByTagName("displayName");
                if (nameNode.length) {
                    ed['displayName'] = this.getChildValue(nameNode[0]);
                }
                attributes[key] = ed;
            } 
        }
        var simpleDataNodes = node.getElementsByTagName("SimpleData");
        for (i = 0, len = simpleDataNodes.length; i < len; i++) {
            var ed = {};
            data = simpleDataNodes[i];
            key = data.getAttribute("name");
            ed['value'] = this.getChildValue(data);
            if (this.kvpAttributes) {
                attributes[key] = ed['value'];
            } else {
                ed['displayName'] = key;
                attributes[key] = ed;
            }
        }
        
        return attributes;    
    }
596300
function getTextOfNode(node) {
        var result;
        if (node != null && node.childNodes[0]) {
            result = node.childNodes[0].nodeValue;
        } else if (node != null) {
            result = "";
        }
        return result;
    }
528213
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'sldTgt'
          @type = :slide
        when 'sndTgt'
          @type = :sound
          @name = node_child.attribute('name').value
          @built_in = node_child.attribute('builtIn').value ? StringHelper.to_bool(node_child.attribute('builtIn').value) : false
        when 'spTgt'
          @type = :shape
          @id = node_child.attribute('spid').value
        when 'inkTgt'
          @type = :ink
          @id = node_child.attribute('spid').value
        end
      end
      self
    end