/** * Adds a tag to the document. * * @param tagName The name of the tag to add. */ public void addTag(String tagName) { if (tagName == null) { return; } tagElements.add(doc.appendXml(getXmlFor(tagName))); }
/** * Adds a tag to the document. * * @param tagName The name of the tag. * @param i The index at which to insert the tag. */ public void addTag(String tagName, int i) { E node = getNthTagNode(i); El<N> point = Point.<N>inElement(doc.getDocumentElement(), node); XmlStringBuilder xml = getXmlFor(tagName); doc.insertXml(point, xml); }