Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

Tricky Java/XML problem

Thread view: 
Stephen Marjoribanks - 29 Mar 2006 15:33 GMT
I have written a Java application which opens an XML file and displays
the data within it in a GUI. For a couple of the elements in my XML
files it is necessary to use XLink attributes so as to specifiy
whereabouts the data was obtained from (ie. another XML file but within
the same local directory). You can think of it as a sort of audit trail,
whereby an 'interpreted' data value must have a link back to the 'raw'
data value it was obtained from. For example a single number in the
'interpreted' file might be obtained by averaging 5 numbers in the 'raw'
XML file. It is necessary to  use XPointers so that a user can easily
see where the averaged value was obtained from.

So, in my Java application I have extracted all the data from the
interpreted data file and now want to be able to allow the user to
choose to open the raw data file to view where the interpretations have
been made using the XLink provided in the raw data file. This is the bit
I am stuck on!
If the files are accessed from over the web then I thought I could
relatively easily open a file from the URI part of the XPointer
expression. The maybe I could use Jaxen or similar to navigate my way to
the correct part of the file using Jaxen or similar, how realistic do
you think this is (bearing in mind im a relative newbie!). If both files
are within the same directory on a users hard drive then presumably I
can locate the raw data file by setting a systemID on the file opened by
the user and then using relative paths to locate the desired file?

Sorry this is a bit of a rambling question, but I'm still trying to
figure out exactly what it is I need to do and the best way to go about it.
Basically my question boils down to: What is the best way to process an
XPointer statement from an XML document within Java so the target
element of the XPointer, within another file, can be opened and viewed
by the user? Is this possible, are there any obvious ways of doing it,
and will it take me ages?!

Many thanks, sorry again for the vague-ish question!

Steve
Stephen Marjoribanks - 30 Mar 2006 13:27 GMT
> I have written a Java application which opens an XML file and displays
> the data within it in a GUI. For a couple of the elements in my XML
[quoted text clipped - 32 lines]
>
> Steve

No-one?
Oliver Wong - 30 Mar 2006 18:46 GMT
>> I have written a Java application which opens an XML file and displays
>> the data within it in a GUI. For a couple of the elements in my XML files
[quoted text clipped - 35 lines]
>
> No-one?

   Assuming your question is "How do I handle XPointers?", try
http://sourceforge.net/projects/xbrlapi/ they have an XPointer parser which
can be downloaded seperately from the rest of the project.

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.