I have to create a desktop application in Java 6. Program should be able to communicate with other system using XML files (sending/receiving). Every single XML file is connected with its XSD, tags describing its content, username and status of the document. Application should provide such functionality as searching, modyfying etc. XML content.
The question is: how should I store all these information retaining logical connections?
I came up with an idea to store it using XML database - BaseX. In other words, storing XML files with information connected to them in one big XML (database) file.
Sample database:
<?XML VERSION="1.0"?>
<mySampleRecord id="1">
<XMLcontent> // Content of XML file (...) </XMLcontent>
<XMLschema> // Content of XSD file (...) </XMLschema>
<tags>j2ee java xml</tags>
<username>File Owner</username>
<status>received</status>
</mySampleRecord>
<mySampleRecord id="2">
<XMLcontent> // Content of XML file (...) </XMLcontent>
<XMLschema> // Content of XSD file (...) </XMLschema>
<tags>doc xls mdb</tags>
<username>Admin</username>
<status>sent</status>
</mySampleRecord>
I was also wondering if it's possible BaseX to read <XMLContent>
node and then treat its content as XML enabling me to perform XQuery operations.
Hope its understandable ;)
Thanks for any hints and suggestions.
Didn't quite get it. :)
So you want to store several XMLFiles with the corresponding schema in another XML file?
Why do that? Just treat each XML file individually. Have them as .xml files inside your .jar .. thus each client can get access to it.
cheers