| java.lang.Object com.sun.portal.fabric.util.XMLJdomUtil
XMLJdomUtil | public class XMLJdomUtil (Code) | | |
Method Summary | |
public int | addChild(String sParentPath, String sChildTagName, Object object) Convert a java.lang.Object to a child (org.jdom.Element), and add
it to a node (org.jdom.Element) of an xml document
(org.jdom.Document). | public int[] | addChildren(String sParentPath, String sChildTagName, List lObject) Convert a list of java.lang.Object to a list of children
(org.jdom.Element), and add it to a node (org.jdom.Element)
of an xml document (org.jdom.Document). | public int[] | addChildren(String sParentPath, List lChildTagName, List lObject) Convert a list of java.lang.Object to a list of children
(org.jdom.Element), and add it to a node (org.jdom.Element)
of an xml document (org.jdom.Document). | public String | getAttribute(String sChildPath, String sAttribName) Get value of a particular attribute of a child (org.jdom.Element)
of the given xml document (org.jdom.Document). | public Element | getChildAsElement(String sChildPath) Return a node of the xml Document (org.jdom.Document) as
org.jdom.Element. | public Properties | getChildAsProperties(String sChildPath) Get the attributes of a node (org.jdom.Element) as
java.util.Properties. | public List | getChildrenAsElementsList(String sParentPath, String sChildTagName) Get the list of the children of a node (org.jdom.Element) in the
xml document (org.jdom.Document) as list of the Element
org.jdom.Element. | public List | getChildrenAsPropertiesList(String sParentPath, String sChildTagName) Get the list of children (org.jdom.Element) of a node
(org.jdom.Element) as list of java.util.Properties from a given
xml document (org.jdom.Document). | public List | getChildrenAsStringList(String sParentPath, String sChildTagName) Get the list of children (org.jdom.Element) of a node
(org.jdom.Element) as list of java.util.String from a given
xml document (org.jdom.Document). | public Document | getXMLJdomDocument() Return XML JDOM Document. | public String | getXMLJdomDocumentAsString() | public void | modifyChild(String sChildPath, String sNewTagName, Properties sNewProps, boolean bCleanContents) Modify an existing child (org.jdom.Element) of the xml document
(org.jdom.Document). | public Document | readXMLFile(String sXMLFile) Read an xml file into an xml document (org.jdom.Document). | public Document | readXMLFileLessSchemaValidation(String sXMLFile) Read an xml file into an xml document (org.jdom.Document). | public void | removeAttribute(String sChildPath, String sAttribName) Remove a particular attribute (org.jdom.Attribute) of a particular
child (org.jdom.Element) of the xml document (org.jdom.Document). | public void | removeChild(String sChildPath) Remove a particular child (org.jdom.Element) of the xml document
(org.jdom.Document). | public void | setAttribute(String sChildPath, String sAttribName, String sAttribValue) Set an attribute (name, value) to a child (org.jdom.Element). | public void | setNamespace(String sChildPath, String sNamespaceName, String sNamespaceURI, String sAttribName, String sAttribValue) Set an Name space (xsi) to a child (org.jdom.Element). | public void | writeXMLFile(String sXMLFile) Write an xml document (org.jdom.Document) to a file. | public void | writeXMLFile(String sXMLFile, boolean bPrune) |
XMLJdomUtil | public XMLJdomUtil()(Code) | | |
addChild | public int addChild(String sParentPath, String sChildTagName, Object object) throws XMLJdomFileCreationException(Code) | | Convert a java.lang.Object to a child (org.jdom.Element), and add
it to a node (org.jdom.Element) of an xml document
(org.jdom.Document).
|
addChildren | public int[] addChildren(String sParentPath, String sChildTagName, List lObject) throws XMLJdomFileCreationException(Code) | | Convert a list of java.lang.Object to a list of children
(org.jdom.Element), and add it to a node (org.jdom.Element)
of an xml document (org.jdom.Document).
|
addChildren | public int[] addChildren(String sParentPath, List lChildTagName, List lObject) throws XMLJdomFileCreationException(Code) | | Convert a list of java.lang.Object to a list of children
(org.jdom.Element), and add it to a node (org.jdom.Element)
of an xml document (org.jdom.Document).
|
getChildrenAsElementsList | public List getChildrenAsElementsList(String sParentPath, String sChildTagName) throws XMLJdomFileCreationException(Code) | | Get the list of the children of a node (org.jdom.Element) in the
xml document (org.jdom.Document) as list of the Element
org.jdom.Element.
|
getChildrenAsPropertiesList | public List getChildrenAsPropertiesList(String sParentPath, String sChildTagName) throws XMLJdomFileCreationException(Code) | | Get the list of children (org.jdom.Element) of a node
(org.jdom.Element) as list of java.util.Properties from a given
xml document (org.jdom.Document). This will return only the
'attributes' part of the org.jdom.Element.
|
getChildrenAsStringList | public List getChildrenAsStringList(String sParentPath, String sChildTagName) throws XMLJdomFileCreationException(Code) | | Get the list of children (org.jdom.Element) of a node
(org.jdom.Element) as list of java.util.String from a given
xml document (org.jdom.Document). This will return only the
'text' type data of the org.jdom.Element.
|
getXMLJdomDocument | public Document getXMLJdomDocument()(Code) | | Return XML JDOM Document.
|
getXMLJdomDocumentAsString | public String getXMLJdomDocumentAsString()(Code) | | Return XML JDOM Document as String
|
modifyChild | public void modifyChild(String sChildPath, String sNewTagName, Properties sNewProps, boolean bCleanContents) throws XMLJdomFileCreationException(Code) | | Modify an existing child (org.jdom.Element) of the xml document
(org.jdom.Document). The modification can be of 3 types as follows:
1. Attach a new attributes list
2. Rename tag
3. Remove contents of the child
More then one type of modification can be performed simultaneously.
|
readXMLFileLessSchemaValidation | public Document readXMLFileLessSchemaValidation(String sXMLFile) throws XMLJdomFileCreationException(Code) | | Read an xml file into an xml document (org.jdom.Document).
Also, Do NOT Validate.
|
removeAttribute | public void removeAttribute(String sChildPath, String sAttribName) throws XMLJdomFileCreationException(Code) | | Remove a particular attribute (org.jdom.Attribute) of a particular
child (org.jdom.Element) of the xml document (org.jdom.Document).
|
removeChild | public void removeChild(String sChildPath) throws XMLJdomFileCreationException(Code) | | Remove a particular child (org.jdom.Element) of the xml document
(org.jdom.Document). Only the first occurence is removed if there
are more then one children (org.jdom.Element) with the same path.
|
|
|