XML to Java and back again

Okay, I've seen this question asked many times and I don't see a lot of great solutions. I've been searching for the last hour and looked at xBeans, XMLBeans, xStream, you name it. Anyway, what I want to do is model my XML and Java objects (if I can't auto-generate the classes) and then at runtime the XML should be loaded directly into the data model. I know that writing a custom parser is old school and there are tools to do this for me but I can't seem to find what I need. What do you recommend for doing this?

Check out the Commons Digester.
The Digester package lets you configure an XML -> Java object mapping module, which triggers certain actions called rules whenever a particular pattern of nested XML elements is recognized.
You can't get any better than this....in my opinion.
Good Luck!

Similar Messages

  • XML to Java and Back.

    hi
    I have a huge XML file (4 MB). I parsed it & put the data in a java object using SAX. its fast. Now I want to generate a XML file from java. I tried JAXB but it takes forever. Does anyone have any better idea?
    Thanks.

    Hi all,
    I know I am the millionth guy asking this question but can I know a great way to generate a XML from java?
    Thanks
    Sunil.

  • Blue screen of death, and continous reboot.  Phone never actually boots up, just keeps going from reboot to blue screen and back again.  Any suggestion?

    Blue screen of death, and continous reboot.  Phone never actually boots up, just keeps going from reboot to blue screen and back again.  Any suggestion?

    Hello jared1915
    If you are stuck in that loop, the next step would be to restore your iPhone. Check out the article below to get your iPhone into recovery-mode and restore it in iTunes.
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    Regards,
    -Norm G.

  • Final Cut Pro X and the Road to **** (and back again)

    Hi Guys,
    I have an interesting article on FCP X by Rick Young. Real world experiences.
    Final Cut Pro X and the Road to **** (and back again)
    http://www.kenstone.net/fcp_homepage/fcp_x_road_young.html
    --ken

    A very interesting article Ken, especially the comments about compound clips within compound clips.
    I've never experienced the horrific problems some folk have claimed but then I never put compound clips within compound clips.
    In  fact, until today I had never made a compound clip! 

  • In Photoshop CS6 my tools freeze or stick until I cursor off to the desktop and back again. will UNINSTSALLING and REINSTALLING resolve this issue

    In Photoshop CS6  sometime's my tools freeze or stick until I cursor off to the desktop and back again, will UNINSTSALLING and REINSTALLING Photoshop resolve this issue?

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, such as total installed RAM, scratch file HDs, video card specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Have the same problem tried the signing in and out, rebooting, uninstalling and back again nothing is working, on 4th download of creative cloud still coming up with lightroom 5 after signing in anf out, also signing out dowloading and signing in, spent 2

    have the same problem tried the signing in and out, rebooting, uninstalling and back again nothing is working, on 4th download of creative cloud still coming up with lightroom 5 after signing in anf out, also signing out dowloading and signing in, spent 2 days on this, just cannot spend days on trying tricks and hacks

    I  am getting so mad because I cant even sign out OR quit! They are both grayed out. I have the spinning blue wheel in my apps and am trying to fix that but none of the solutions are working.

  • How to convert apple tv's hdmi output to cat6 and back again

    Hi,
    I have just reovated my room and have wired in 2 x cat 6 cables from the place which i have my apple tv set up to a projector on my wall. I want to know which converter would be best and usuable to convert the hdmi output on apple tv to cat6 and then back again to hdmi to connect to my projector?
    I have already bough some relitivly cheep hdmi to cat6 sender and recervers from ebay however i can only get sound to work (i.e. i can hear the sound when i press the apple tv remote) but there is no image. the projector i am usuing is a acer but will be changing this in a few weeks
    Please help.
    Regards
    Shaun

    Have a look at this, and possibly other items from this firm (though I have no experience of them):
    http://www.keene.co.uk/electronic/cyp/puma-hdmi-over-single-cat6-hdbaset-kit/pu5 06.html

  • Query resultset to xml using java and XML schema

    Hi,
    I query data using JDBC and I want to store it to an XML file which has a well defined XML schema. I searched a lot in the forum but did not find an answer. Please guide me to create this program.
    I have managed to use JDBC to get result set but I do not know how to export is to XML using XSD and Java.
    Please help.
    Regards,
    Ravi

    I have managed to use JDBC to get result set but I do
    not know how to export is to XML using XSD and Java.Export using XSD? Schemas are for validation.
    Iterate through the result set, and build up the XML stream by creating an entry for each row.
    Another way to do it is to load the ResultSet into a Java object and serialize that to XML using something like XStream.
    %

  • Logic 8 - Pro Tools - and back again... suggestions?

    Hi all,
    I have the opportunity to add real drums, recorded at a really nice, professional studio, to my songs. I have a modest home studio centered around Logic and live drums just aren’t a reality for me at home.
    This studio only runs PT. In the past I’ve moved from format to format by bouncing all the audio tracks from bar one / beat one (because I’ve never been able to just import the raw audio files into the new app and have them line up) to new audio files and importing them into the new project. This can be very time consuming, so here’s my question:
    Is there any faster / better way to get from platform to platform? It seems this "OMF" thingy might be of some help but I've never used it before and I know very little about the way PT works. I know that I can just mute the sequenced drums I already have and bounce a stereo mix for the drummer to play to in the PT session. It’s getting all those track of drums out of PT and back into Logic at home that I’m wondering about.
    Thoughts? Musings?? Anecdotes? All help is appreciated, and thanks a lot!!!

    To expand on David's excellent advice...
    Bounce a stereo track from within Logic, that your drummer will play to. Just make sure the bounce starts at bar 1, beat 1, as indicated in the locator boxes from the bounce window.
    Note the tempo of your song.
    In a new Pro Tools session, set the tempo the same, and import the stereo track you bounced from Logic. Make sure it is placed at bar 1, beat 1. (I believe it imports to this location by default).
    Record your drums.
    When finished, consolidate the files (option/shift/3 in PT). These will create contigous audio files that start from bar 1, beat 1. Just make sure you select ALL the drum tracks, and that the start point in PT's locator window is at bar 1, beat 1.
    You may also need to Export the drum tracks, if they were recorded to the studio's HD. After consolidating, hit command/shift/K. This will bring up a navigational box, asking you where you want these newly consolidated audio files to go. Select your external drive.
    When you get back to Logic, simply import all the drum tracks. If you took several takes, utilizing PT's playlists, you'll notice that PT puts a 1 after the names of the second playlist, a 2 after the third playlist, etc...
    So you'll have sometng like Kick (take 1), Kick.1 (take 2) Kick.2 (take 2), etc...
    You can then import all these audio files into Logic, placing them at bar 1, beat 1.
    If you want to sift through the seperate drum takes, put each take into a folder. Do a search here, as that method of comping drums from wihin Logic has been discussed in deatail many times here.

  • How to write from database to XML file using JAVA and back..

    Hi....
    I am strugling for a code to write from database to xml output instead of what i have written in flat file....could anyone please help me out...to do this and again read the same back to the database using java...

    Hi,
    In java world, there is a tutorial on what you are looking for :
    http://www.javaworld.com/javaworld/jw-01-2000/jw-01-dbxml_p.html
    It uses SAX/DOM parsers to translate XML data into the appropriate fields of the database and visa-versa.
    Hope it helps.

  • Help needed to converstae xml with java and database

    I want to make use of xml to read soem data from database and then use that material in java to display or manipulate that data and again feed back it into database through xml.

    why using XML? how about JDBC?

  • Xml, xsl, java and database

    I have several xml documents that uses different tags to describe the same type of information. In my case they describe a row in a database table.
    file1.xml
    <therow>
    <name>Jones</name>
    <title>manager</title>
    </therow>
    file2.xml
    <arow>
    <employee>King</employee>
    <job>manager</job>
    </arow>
    I want to use a technology for reading the content of the two files and generate a new document for each file that will use generic tags so the content of the new files could look like:
    file1
    <row>
    <employeename>Jones</employeename>
    <employeetitle>manager</employeetitle>
    </row>
    file2
    <row>
    <employeename>King</employeename>
    <emplyeetitle>manager</employeetitle>
    </row>
    An then I can read this information by using a generic Java class and insert it into the database table..
    I was told that the technology used for doing this was XSLT. I have been searching the web for examples and also tried to read some of the content in the Steve Muench book 'Building Oracle XML Applications'.
    I have managed to create XSL files, but I would really appreciate if someone could show me a real example of how to do this, with the xml file, the xsl file, and a small java program to read this. Can anyone help?

    Post your XSL files, otherwise we'd have to write them again.

  • IMovie 4 to iMovie HD and back again

    I have read countless threads on issues related to choppy video in iMovieHD, but I haven't yet discovered a solution to my situation. I'm also dizzy with all the options, iMovie 4 vs iMovie HD, QT 7 vs QT 6.5.2, QT Cache Size, etc...
    In years past, I have used iMovie 4 successfully on a number of big projects. These movies were usually from 60 to 90 minutes, with tons of video clips, audio clips, stills, transitions and effects. I never had a problem. This is work repeating. I never had a problem.
    Then enter stage iMovie HD, and Quicktime 7. Neither seemed to have new features that I needed, but I figured, what the heck, maybe it improves performance. This is where my nightmare begins. I honestly do not know which software it the culprit, but I was in the middle of one of the most important video projects yet (and one of the biggest). Perhaps I deserve my fate since I didn't save the iMovie 4 project file, but I'm hoping some of you will be forgiving. Yes, I converted my iMovie 4 project to iMovie HD, and did not save the old project file. I didn't notice (or don't remember noticing) at first, so maybe the problem didn't start until I upgraded to QT 7. But at some point in time, I noticed a big problem in my project. I would start playing the movie to see how things were coming together, and my video would just freeze at arbitrary points (after a minute or so of playing okay). It starts getting choppy first, then the frame just freezes. The playhead continues to movie, and choppy audio is heard, but the video just seems to die.
    I wiped the drive, and reinstalled iLife 04. I'm running OS X 10.3.9, and software update updated me to Quicktime 7 again. So I have a number of questions, all hopefully leading to resolution of this issue. I've lost weeks of time on this project, and I need to get it back on track.
    1. I have the iMovie HD project, but I want to work on it in iMovie 4 instead (had better luck with iMovie 4). Is there any way to mod the iMovie HD project file, or any utility, so that I can open it with iMovie 4 (and have all my clips and transitions, etc., restored)?
    2. Was downgrading from iMovie HD to iMovie 4 the wrong solution completely? Is the culprit really Quicktime 7?
    3. Does the latest Quicktime resolve this issue? I'm trying to decide whether I should upgrade to iMovie HD again. I really don't know what to do at this point. There's so much at stake, but lately my productivity has been zero, so something has to happen.
    I guess I'm looking for a direction to go, and I currently feel very lost. Reading the past threads made me dizzy. I just want things to be the way they were: working. Can someone push me in the right direction?

    Now I know how you equated donmerlin with Bill... I got so flustered with this problem, I ended up forgetting which Apple ID I posted under. Here is an update to the problem.
    I really wanted to stay with QT 7.0.3 because the latest DVD Studio Pro requires it (as does iTunes for video playing). I tried to stay with QT 7 and revert back to iMovie 4, but because the old iMovie 4 project file was converted to iMovie HD (and there's not way to go back), I basically had to recreate the iMovie project from scratch. I started to do this, by first creating a new iMovie 4 project, then copying all of the 100's of media files from the other project into this one. Once I realized the magnitude of work involved, figuring out what's what, and which clips are transitions and effects, I knew this was a bad way to go. And chances are, it would have still been a problem, since most of what I've read has to do with QT 7 being the problem. So I changed directions.
    I am fortunate enough to have two G4's, so I left QT 7.0.3 on this one, and decided to downgrade QT on my other G4. First I ran the QT 7.0.1 Reinstaller (had to use Pacifist, since the Apple installer refused to let it run). Then I ran the QT 6.5.2 Reinstaller. After that, I opened up the iMovie HD project, and lo and behold, the freezing and staggering playback issues were gone! Words cannot express the feeling of relief I had. In retrospect, I am still quite disappointed that Apple introduced an upgrade to QT that caused this horrible problem, and appears to have done nothing to resolve it. The good news is that I found my way around the problem via the QT downgrade path, and I'll never upgrade QT on this other G4 again. Thanks to everyone in sharing in my grief and posting suggestions (both in response to my post and others).

  • If I open a PDF doc in a new tab and then try and close the tab with ctrl-w it will try and close all tabs unless I switch to another tab and back again.

    Running Firefox beta and Adobe Acrobat 10. If I open a PDF document in a new tab, say http://support.avaya.com/css/P8/documents/100146419, and then try and close the tab using ctrl-w, I get the message warning me about closing all tabs. If I switch to another tab and then back to the PDF document and then hit ctrl-w, it will just close that one tab and not all tabs.
    Cheers.

    I've just been playing around and I set dom.ipc.plugins.enabled to true and now it closes the PDF document but not the tab. I have to do ctrl-w again to close the tab. However, leaving that set to true ruins the scroll mouse functionality as Acroread seems to want it all to itself.

  • Restore Computer Back to Vista after Windows 7 upgrade and back again?

    I got Satellite L505-S6946 that came with Vista Home Premium installed (I immediately made backup-5 disks in all). I got the free Windows 7 upgrade disk from Toshiba and upgraded my laptop. I messed up and did not make the backup disks like I should have. I had to reinstall windows 7 more than once (shouldn't let others use my computer!) and it hasn't seem to run quite the same after reinstall. I also noticed that for a driver Intel ICH9 Family SMBus Controller 2930 it says no device driver installed. I didn't notice that before. And I have tried to install it. Whatever the cause, to me it just doesn't seem to run the same. I was wondering if I could go back and reinstall Vista from my disks and then upgrade to windows 7 with my upgrade again (and this time make backup copy!)? I apologize in advance if this is a stupid question but I am not really computer savvy. Thank You. Jakey58

    Satellite L505-S6946
    Just adding my two cents worth...
    We have lots of machines running Windows Vista. (I'm typing this message on one.) They work just fine. I never even consider upgrading them to Windows 7.
    Just because the Geeks don't like Vista and just because Microsoft wants you to use the latest and greatest doesn't mean you must upgrade.
    I've heard some people put solar panels on the shady side of the house where the neighbors can see them.
    -Jerry

Maybe you are looking for