public virtual void Tail(iText.StyledXmlParser.Jsoup.Nodes.Node node, int depth) { if (!node.NodeName().Equals("#text")) { // saves a void hit. try { node.OuterHtmlTail(accum, depth, @out); } catch (System.IO.IOException exception) { throw new SerializationException(exception); } } }
// includes remove() // fast method to get first by tag name, used for html, head, body finders private iText.StyledXmlParser.Jsoup.Nodes.Element FindFirstElementByTagName(String tag, iText.StyledXmlParser.Jsoup.Nodes.Node node) { if (node.NodeName().Equals(tag)) { return((iText.StyledXmlParser.Jsoup.Nodes.Element)node); } else { foreach (iText.StyledXmlParser.Jsoup.Nodes.Node child in node.childNodes) { iText.StyledXmlParser.Jsoup.Nodes.Element found = FindFirstElementByTagName(tag, child); if (found != null) { return(found); } } } return(null); }
public void Tail(iText.StyledXmlParser.Jsoup.Nodes.Node node, int depth) { accum.Append("</" + node.NodeName() + ">"); }