Uses of Interface
com.mycila.xmltool.XMLTag
-
Uses of XMLTag in com.mycila.xmltool
Classes in com.mycila.xmltool that implement XMLTagClasses in com.mycila.xmltool that implement interfaces with type arguments of type XMLTagMethods in com.mycila.xmltool that return XMLTagModifier and TypeMethodDescriptionXMLDoc.addAttribute(String name, String value) XMLDoc.addAttribute(Attr attr) XMLTag.addAttribute(String name, String value) Create a new attribute for the current nodeXMLTag.addAttribute(Attr attr) Add given attribute to current elementXMLDoc.addCDATA(CDATASection data) Add a data node under the current node, and jump to the parent node.XMLTag.addCDATA(CDATASection data) Add a CDATA note to the current tagXMLDoc.addDocument(XMLTag tag) XMLDoc.addDocument(Document doc) XMLTag.addDocument(XMLTag tag) Inserts anotherXMLTaginstance under the current tag.XMLTag.addDocument(Document doc) Inserts anotherDocumentinstance under the current tagXMLDoc.addNamespace(String prefix, String namespaceURI) XMLTag.addNamespace(String prefix, String namespaceURI) Add a namespace to the documentCreate a root node for this XML documentInserts anotherXMLTagtag hierarchy under the current tag.Create a tag under the current location and use it as the current nodeInserts aElementinstance and its hierarchy under the current tagAdd a text node under the current node, and jump to the parent node.Add a text note to the current tagprivate static XMLTagXMLDocBuilder.create(XMLDocDefinition def) XMLDoc.delete()XMLTag.delete()Delete current tag and its childs.XMLDoc.deleteAttribute(String name) XMLTag.deleteAttribute(String name) Delete an attribute of the current node.XMLDoc.deleteAttributeIfExists(String name) XMLTag.deleteAttributeIfExists(String name) Delete an attribute of the current node, if it existsXMLDoc.deleteAttributes()XMLTag.deleteAttributes()Delete all existing attributes of current nodeXMLDoc.deleteChilds()XMLTag.deleteChilds()Delete all existing elements of this nodeXMLDoc.deletePrefixes()XMLTag.deletePrefixes()Remove any prefix and namespaces contained in the tag name, childs and attributes, thus changing namespace and tag name.XMLDoc.duplicate()XMLTag.duplicate()Execute an action for each selected tags from the current node.XMLDoc.forEachChild(CallBack callBack) XMLTag.forEachChild(CallBack callBack) Execute an action for each child in the current node.static XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagXMLDoc.from(InputStream is) static XMLTagXMLDoc.from(InputStream is, boolean ignoreNamespaces) static XMLTagXMLDoc.from(InputStream is, boolean ignoreNamespaces, String encoding) static XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagstatic XMLTagXMLDoc.from(InputSource source) static XMLTagXMLDoc.from(InputSource source, boolean ignoreNamespaces) (package private) static XMLTag(package private) static XMLTag(package private) static XMLTag(package private) static XMLTagXMLDocBuilder.from(InputStream is, boolean ignoreNamespaces) (package private) static XMLTagXMLDocBuilder.from(InputStream is, boolean ignoreNamespaces, String encoding) (package private) static XMLTag(package private) static XMLTag(package private) static XMLTag(package private) static XMLTag(package private) static XMLTag(package private) static XMLTag(package private) static XMLTag(package private) static XMLTag(package private) static XMLTag(package private) static XMLTagXMLDocBuilder.from(InputSource source, boolean ignoreNamespaces) static XMLTagXMLDoc.fromCurrentTag(XMLTag tag, boolean ignoreNamespaces) Create anotherXMLTaginstance from the hierarchy under the current tag.(package private) static XMLTagXMLDocBuilder.fromCurrentTag(XMLTag tag, boolean ignoreNamespaces) XMLDoc.getInnerDocument()XMLTag.getInnerDocument()XMLDoc.gotoChild()XMLDoc.gotoChild(int i) XMLTag.gotoChild()Go to the only child element of the curent node.XMLTag.gotoChild(int i) Go to the Nth child of the curent node.Go to the child found with given node nameXMLDoc.gotoFirstChild()XMLDoc.gotoFirstChild(String name) XMLTag.gotoFirstChild()Go to the first child element of the curent node.XMLTag.gotoFirstChild(String name) Go to the first child occurance found having given nameXMLDoc.gotoLastChild()XMLDoc.gotoLastChild(String name) XMLTag.gotoLastChild()Go to the lastest child element of the curent node.XMLTag.gotoLastChild(String name) Go to the last child occurance found having given nameXMLDoc.gotoParent()XMLTag.gotoParent()Go to parent tag.XMLDoc.gotoRoot()XMLTag.gotoRoot()Go to document root tagGo to a specific nodeIteratorAdapter.next()Replace current element name by another nameXMLDoc.setAttribute(String name, String value) XMLDoc.setAttribute(String name, String value, String relativeXpath, Object... arguments) XMLTag.setAttribute(String name, String value) Sets the new value on an existign attribute, and remains on the current tag.XMLTag.setAttribute(String name, String value, String relativeXpath, Object... arguments) Sets the new value on a targetted node's attribute, and remains on the current tag.XMLDoc.setAttributeIfExist(String name, String value) XMLDoc.setAttributeIfExist(String name, String value, String relativeXpath, Object... arguments) XMLTag.setAttributeIfExist(String name, String value) Sets the new value on an attribute, and remains on the current tag.XMLTag.setAttributeIfExist(String name, String value, String relativeXpath, Object... arguments) Sets the new value on a targetted node's attribute, and remains on the current tag.Set the cdata in the current node.Set the cdata in the targetted node.XMLDoc.setCDATAIfExist(String data, String relativeXpath, Object... arguments) XMLTag.setCDATAIfExist(String data, String relativeXpath, Object... arguments) Set the cdata in the targetted node.Set the text in the current node.Set the text in the targetted node.XMLDoc.setTextIfExist(String text, String relativeXpath, Object... arguments) XMLTag.setTextIfExist(String text, String relativeXpath, Object... arguments) Set the text in the targetted node.Converts this document to the result providedConverts this document to the result provided, overriding default encoding of xml documentXMLDoc.toStream(OutputStream out) XMLDoc.toStream(OutputStream out, String encoding) XMLTag.toStream(OutputStream out) Write this document to a streamXMLTag.toStream(OutputStream out, String encoding) Write this document to a streamWrite this document to a streamWrite this document to a streamMethods in com.mycila.xmltool that return types with arguments of type XMLTagModifier and TypeMethodDescriptionXMLDoc.getChilds()XMLTag.getChilds()XMLTag tag = XMLDoc.newDocument(true) .addRoot("root").addTag("a") .gotoParent().addTag("b") .gotoParent().addTag("c") .gotoRoot(); assertEquals(tag.getCurrentTagName(), "root"); for (XMLTag xmlTag : tag.getChilds()) { if(xmlTag.getCurrentTagName().equals("b")) { break; } } assertEquals(tag.getCurrentTagName(), "b");Create an iterable object over selected elements.Methods in com.mycila.xmltool with parameters of type XMLTagModifier and TypeMethodDescriptionXMLDoc.addDocument(XMLTag tag) XMLTag.addDocument(XMLTag tag) Inserts anotherXMLTaginstance under the current tag.Inserts anotherXMLTagtag hierarchy under the current tag.voidstatic XMLTagstatic XMLTag(package private) static XMLTagstatic XMLTagXMLDoc.fromCurrentTag(XMLTag tag, boolean ignoreNamespaces) Create anotherXMLTaginstance from the hierarchy under the current tag.(package private) static XMLTagXMLDocBuilder.fromCurrentTag(XMLTag tag, boolean ignoreNamespaces)