|
andyLib v0.9.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.andynaz.utils.UtilsXML
@Deprecated public class UtilsXML
Useful methods for an elementary management of XML files.
To read and write XML files, methods in the UtilsIO
class can be used.
Constructor Summary | |
---|---|
private |
UtilsXML()
Deprecated. |
Method Summary | |
---|---|
static String |
readTag(File file,
String tag)
Deprecated. Read the content of a tag from an XML file. |
static String |
readTag(String fileContent,
String tag)
Deprecated. Read the content of a tag from an XML file. |
static void |
replaceTag(File file,
String tag,
String content)
Deprecated. Replace the content of a tag. |
static String |
replaceTag(String fileContent,
String tag,
String content)
Deprecated. Replace the content of a tag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private UtilsXML()
Method Detail |
---|
public static void replaceTag(File file, String tag, String content)
replaceTag(java.lang.String, java.lang.String,
java.lang.String)
method.
The method does not throw any Exception; if an error occours it writes a log on the standard output.
file
- an XML filetag
- tag namecontent
- new tag contentpublic static String replaceTag(String fileContent, String tag, String content)
Note: only the first occourrence will be replaced.
fileContent
- content of the XML filetag
- tag namecontent
- new tag content
public static String readTag(File file, String tag) throws IOException
readTag(java.lang.String, java.lang.String)
method.
Note: only the first occourrence of the tag is read.
file
- an XML filetag
- tag name
IOException
- if I/O errors occourpublic static String readTag(String fileContent, String tag)
Note: only the first occourrence of the tag is read.
fileContent
- content of an XML filetag
- tag name
NullPointerException
- if the tag parameter is empty
|
andyLib v0.9.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |