|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeer2me.util.XMLTool
public class XMLTool
This class uses the open source xml pull parser, KXmlParser. It searches through an xml string or file that follows the filesystem.dtd described in the prestudy by Bjørnsgård and Saxlund.
Constructor Summary | |
---|---|
XMLTool()
Creates a new instance of the KXmlParser |
Method Summary | |
---|---|
ShareObject[] |
getFolderContents(java.lang.String folder)
Gets the shareObjects in a folder and returns them in an array. |
java.lang.String |
getFullPathOfFile(int fileID)
Gets the full path of a file with the specified fileID |
java.lang.String |
makeUniqueIDPropertiesField()
Replaces all occurences of id="X" with a unique X". |
boolean |
openXMLFile(java.lang.String filename)
Opens the XML-file for reading. |
void |
openXMLString(java.lang.String plainText)
Opens the XML-string for reading. |
java.lang.String |
removeFullPathAttribute()
Removes the full path attributes in the xml tags in the xmlString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLTool()
Method Detail |
---|
public ShareObject[] getFolderContents(java.lang.String folder)
folder
- the folder to get the contents of. The folder path must be absolute.
public java.lang.String getFullPathOfFile(int fileID)
fileID
- The unique fileID to search for
public java.lang.String makeUniqueIDPropertiesField()
id="X"
with a unique X".
public java.lang.String removeFullPathAttribute()
public boolean openXMLFile(java.lang.String filename)
filename
- the name of the file to open
true
if the file got opened, else false
public void openXMLString(java.lang.String plainText)
plainText
- the xmlstring to open for parsing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |