What should be done for this ?

hi ,
here is my question ..my xml will have
<Message>
<ATO>
<somefiled="X" type=int value=35 />
</ATO>
<FIX>
<somefiled="Y" type=String value=50 />
<FIX>
</Message>
Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
what should be done for this ..
and what if i change values in my xml file..will i have to restart my application to load xml again ?

I have changed your XML to make it well formed. Please refer this further in this reply.
Well Formed XML:
<Message>
     <ATO somefiled="X" type="int" value="35"/>
     <FIX somefiled="Y" type="String" value="50"/>
</Message>
daitkarsachin wrote:Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
what should be done for this ..A simple XPath Query can do trick for you, it can give you ATO or FIX element according to user specified value. XPath query can be:
// replace ##user_specified_value## with value user enters.
String xPathquery= "/Message/child::*[@value='##user_specified_value##']";
daitkarsachin wrote:and what if i change values in my xml file..will i have to restart my application to load xml again ?Not necessary to restart application but you need to parse or reload updated XML file again.

Similar Messages

  • Need Help..what should i use for this

    hello friends, i have to write a program which will load an xml file reader class at run time and depending on the content of xml file i'm going to generate mapping.. e.g xml file- <MyMapping> <ATO> <security type=int> </ATO> <FIX> <symbol type=String> </FIX> </MyMapping> Now i want to change the content of xml file without restarting my running application..changes should be reflected at runtime... also my xml file will contain nearly 1000 lines..so in this case which technique should i use whether i use JAXB which will give the classes of my xml file or any other ?? Also if i use JAXB whether JAXB gives classes corrsponding to my xml nodes (e.g ATO.java as per above example).

    daitkarsachin wrote:
    hi ,
    here is my question again..my xml will have
    <Message>
    <ATO>
    <somefiled="X" type=int value=35 />
    </ATO>
    <FIX>
    <somefiled="Y" type=String value=50 />
    <FIX>
    </Message>
    Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
    You will read the XML structure into some kind of memory model. When the user supplies a value you will search for a matching value (likely from a collection such as a map or list) and return the value in that object that you locate.
    what should be done for this ..
    See above.
    and what if i change values in my xml file..will i have to restart my application to load xml again ?
    If you change the file on the filesystem, you should simply be able to re-parse the XML file and update your in-memory model. If you instead update your in memory-model, you can serialize the model back to XML on the filesystem. Neither needs to necessarily have anything to do with application start-up (other than the fact that you would normally read in the XML model then, but updating is a separate concern, as would re-reading it).
    - Saish

  • I can't install any software,it said iOS 4.3,iOS 5, etc required.what should I do for this iOS....????

    I can't install any software,it said iOS 4.3,iOS 5, etc required.what should I do for this iOS....????

    Connect it to iTunes on a computer and check for updates.
    (74556)

  • HT4623 I Can't able to download IOS 7. I n my software update it is giving an error " Unable to check for updates. An error occured while checking for software update". What can be done for this error?

    I Can't able to download IOS 7. I n my software update it is giving an error " Unable to check for updates. An error occured while checking for software update". What can be done for this error?

    Me too having the same thing what's the solution for this how can I update

  • I have DAP (Download Accelarator Plus) installed in my Laptop. It was working fine in Firefox 4 but few days ago since i've updated the browser to firefox 5 its not working at all. Please suggest what should be done as this software isnt workg as of now?

    cant download using DAP

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • HT4623 Hi . My iPhone 4S Facebook page won't rotate either it's lock or unlock what should I do for it could some body tell me about this problem plz

    Hello dear I want to ask that when I am using the Facebook app in my iPhone 4S I want rotate the screen but its not turn over in side ways other all pager or apps like text massages , safari browser , all rotate but only having problem with my Facebook that I can not rotate so please can some body tell me what should I do for this problem .
    Waiting for positive answer.
    I look forward to hear from you people soon thanks
    Regards ,
    Syed Basharat Ali

    They may not have the updated Facebook app. I have a 4S and my Facebook will not rotate. You can use Google and find more information about this. I'm just reporting what is going on and why it is happening.
    Google:
    http://www.google.com/search?q=ios+facebook+app+rotation&sourceid=ie7&rls=com.mi crosoft:en-us:IE-Address&ie=&oe=
    One of the links from Macrumors:
    http://forums.macrumors.com/showthread.php?t=1427794
    Message was edited by: ChrisJ4203

  • IPad Air with iOS 8.02 freezes and blue screen appears. What should be done ? Why is this happening ?

    IPad Air with iOS 8.02 freezes and blue screen appears. What should be done ? Why is this happening ?

    If nothing else works, you might try this one. It has worked for many others ...
    Use iTunes to do a reset to factory default condition. Always be sure to do your backups before fiddling with your iPad. You might do both the iCloud and the iTunes backup, just to be sure!
    Back up and Restore your iOS Device with iCloud or iTunes
    http://support.apple.com/kb/ht1766
    iTunes: About iOS Backups
    http://support.apple.com/kb/ht4946
    Use iTunes to Restore your iOS Device to Factory Settings
    http://support.apple.com/kb/ht1414
    Various issues from many different users have been solved by this. I've lost count on how many have been helped by this, so far. But, it doesn't mean EVERYONE will be helped, but I've seen a whole lot. You can only try and see ...
    iPad 2 and iOS 8.0.2 Problems
    For all iPad 2 owners, this is an important solution for you! These problems result from long-term use, continuous upgrades, corrupted files and various glitches that happen over this long term use. You just need to get your iPad 2 back to FACTORY FRESH CONDITION to start out clean!
    Here's one person's solution which will help a lot of iPad 2 users!
    keithfrommariettaOct 12, 2014 3:25 PM Re: IPAD2 very slow after IOS 8 upgrade
    Re: IPAD2 very slow after IOS 8 upgradein response to pacoKAS
    SOLVED:  IOS 8 Issues on iPad 2:
    I just returned home from a visit to the Genius Bar. Like you and many others, when I upgraded my iPad 2 to IOS 8, it became practically unusable. It was VERY slow, lagged whenever trying to to do anything. Lots of screen freezes and apps spontaneously crashing. I was convinced that the processor on the iPad 2 just couldn't handle the new IOS and I went in to see about restoring to IOS 7.
    Thankfully, I was hooked up with a very sharp guy at the bar. The problem is not with the OS, it is with it being an *upgraded* OS. He used the analogy of when you had an older Windows computer and how over time (and over upgrades), they just tended to get slower and slower because of all of the garbage that was carried forward in the upgrades. At those times (and if you've ever had a Windows computer, you get this), the only thing that would speed it up would be to wipe the machine and do a fresh install of the current OS and then reload your apps, and the viola, everything would be fast again. Well, it turns out that IOS can suffer the same problems.
    THE FIX:  FIRST, be sure you have a current iCloud backup of your device.  Connect your iPad to a computer that has a clean fresh copy of IOS 8 on iTunes (this is best done with a computer other than the one that you sync your device to because you DO NOT want to restore it from a back up just yet). Ideally, if you do this at an Apple store you'll be assured of the right version there and someone to answer any questions you might have along the way. You then hold the power and home button down to hard-reset the device and continue to hold them down until it reboots into recovery mode. You then follow the instructions on the computer to reinstall the OS on the device (which wipes everything from it and then reinstalls a clean copy of it). Once this is done (which only takes about 15 minutes), your device will reboot and ask you to set it up. Answer the questions about language, location, etc. and continue until it asks you to log into your iTunes account. Once you do that, it will ask if you want to either 1) Set it up as a new device, 2) Restore from iCloud, or 3) Restore from iTunes. Choose (2), restore from iCloud. This will ensure that it brings down "clean" copies of all of your apps and preferences rather than the potentially corrupted ones that might reside in your iTunes backup. That's it! It will take a few hours depending on how much data and apps you have, but I am happy to report that my iPad 2 is now running IOS 8 and it's running as fast as it ever did when it was brand new!
    To sum it up, this process 1) Wipes your device and the garbage causing your problems, 2) Loads a clean and bug-free version of IOS 8 to your device, and 3) restores your apps and data so that it looks just like it did before the wipe, with the exception that it works now!  :-)
    Note also that by following this process you don't have to go through the painful and laborious process of reloading all of your apps, data and/or settings. iCloud takes care of all of that for you.

  • When i download music from internet it is not shown in my phone's music library....what should be done to fix this?

    When i download music from internet it is not shown in my phone's music library....whenever i want to listen that music i have to open that application through which i have downloaded it. What should be done to fix this?

    you can only get music to work if
    1. it was downloaded on the itunes app in the iphone
    2. it was synced from itunes on a computer
    downloading files does not work

  • Since loading ios5 I don't see oll my music library......What can I do for this? Thank you.

    What can I do for this? Thank you.
    - Never in the library of Itunes
    - Never on the store !!!!!!!!

    Which MSN Hotmail application are you referring to?
    Do you mean Mail? or Safari? Both should be in the Applications folder on your hard disk.. Just drag it's icon back onto the Dock.
    If you're talking about MSN Messenger, it should be wherever you installed it to.. If you have MS Office, try checking in the MS Office folder (probably under Applications). Or try using Spotlight to search for it.

  • I just heard a news report that there is a problem with malware in mac computers that came through a recent java update. Is this true? If so, what should be done about it?

    I just heard a news report that there is a problem with malware in mac computers that came through a recent java update. Is this true? If so, what should be done about it?

    As usual those "news" reports mangled the facts and got most of the story completely wrong. This particular attack did not arise through a Java update, it was distributed through a fraudulent Flash download popup window, or malicious websites that Safari is designed to block.
    If you run Java on your Mac you may be vulnerable to this malware. If you do not run Java there is no risk. If you routinely keep your Mac up to date with Software Update the risk is greatly reduced.
    Shut off the mass market junk that masquerades as "news" and read this to learn some real facts:
      https://discussions.apple.com/docs/DOC-3271

  • Hello, My iph5s screen cracked according an accident I just had it since February with threeG mobile network , I have been told I can replace my phone or get it fixed by apple for free, can you please let me know what should I do about this matter ?

    Hello, My iph5s screen cracked according an accident I just had it since February with threeG mobile network , I have been told I can replace my phone or get it fixed by apple for free, can you please let me know what should I do about this matter ?

    Oh well that's what I heard because it's about the 90 days warranty ,,. Anyway can you please tell me what I can do to get it fixed ? It's a not really big crack in the right bottom side of the screen

  • I have my Adobe ID and the Adobe Digital Editions. But when I download an EPUB-ebook, I don´t see the ebook or "My Digital Editions-Bibliothek".What is the solution for this problem?

    @I have my Adobe ID and the Adobe Digital Editions. But when I download an EPUB-ebook, I don´t see the ebook or "My Digital Editions-Bibliothek".What is the solution for this problem?

    how can we solve the problem?
    I have my adob.e ID, downloaded Adobe Digital Editions.
    Whren I download EPUB-ebooks and want to use
    Digital Editions, nothing happens and appears!??
    Please give me a short feedback and help

  • HT201263 Hi my Ipohone4 wen restoring show "We're sorry, we are unable to continue with your activation at this time. Please try again later, or contact customer care."   What should be done to restore it

    Hi
    My Ipohone4 wen restoring show "We're sorry, we are unable to continue with your activation at this time. Please try again later, or contact customer care."   What should be done to restore it.
    Can u give a solaution asap.

    Has your phone been jailbroken or hacked to unlock it from the previous carrier?

  • HT1212 Hello, for some reason i'Ve lost the ability to access my ipad, although i know the password, the ipad now is deactivated and telling me to connect to iTunes, i've done so but itunes can not access it anyway. Please tell me what should be done to r

    Hello, for some reason i'Ve lost the ability to access my ipad, although i know the password, the ipad now is deactivated and telling me to connect to iTunes, i've done so but itunes can not access it anyway.
    Please tell me what should be done to retrieve my photos on ipad before reformatting it.

    Unless you've done anything to change it, Google keeps every email that ever passes through their server in your All Mail folder/mailbox/label. Even if you delete stuff, they hold onto it, there. You have to go out of your way to actually delete anything permanently.

  • Hello . I'd like to buy an iPhone 5S Space Gray 64GB and get free shipping from the USA to Russa but the problem is I don't know about wireless service plan . What should I choose for Russian wirelesses ? Does T-Mobile work in Russia ? Please , help me

    Hello . I'd like to buy an iPhone 5S Space Gray 64GB and get free shipping from the USA to Russa but the problem is I don't know about wireless service plan . What should I choose for Russian wirelesses ? Does T-Mobile work in Russia ? Please , help me
    Sorry , but product is iPhone 5S

    You can't buy from the Apple store online in the US because it is country specific and you firstly need a US credit card and then a US address and they won't ship outside of the US so you can't.
    No Apple online store will ship outside the coutry.
    If you want an iPhone, then you'll have to order via the Russian Apple store online if there is one, or you'll have to wait until it is released in your own country or go and buy one in Europe.

Maybe you are looking for

  • Creating Caches for faster browsing experiences

    I really like the functionality with spry tabbed panels.  I am creating an online portfolio and in one of my pages, I would like to put up many documents that I have created over the years.  These documents (mainly pdfs) come from the root folder at

  • Bulk Collect with FORALL not working - Not enough values error

    Hi, I am trying to copy data from one table to another which are having different number of columns. I am doing the following. But it threw not enough values error. Table A has more than 10 millions of records. So I am using bulk collect instead of u

  • "Quicktime was not found"

    Help Itunes had been working great and all of the sudden it stopped working. Whenever I click the icon, it gives me the 'Quicktime was not found...Quicktime is required for Itunes, please re-install Itunes'. I've tried uninstalling and installing (5

  • Creating a help document

    I want to create a PDF document that is like a help document that you would open in Preview. What I have in mind is the Final Cut Pro user manual, which has the drawer on the right side with the huge entire outline that is collapsed and makes it real

  • Stock Quotes on iPhone

    What is the symbol for the NASDAQ Market for the stock quotes on the iPhone?