Turning 'write to xmp' back on

I was having the sluggish performance after upgrading to 1.3 that many experienced when the 'write changes to xmp' was turned on. So I turned it off and all has been well.
It sounds like the issue has been solved with recent updates and I would like to turn it back on. My question is, what is the best way to do this? I have 14,000 images in the database. Am I going to crash the system by turning it on with so many to update?
Or should I rebuild the catalog? And if that is the recommended procedure, how do I do that? I have searched for that, but have come up with no threads.
Thanks for any advice!

You don't need to turn it on, but saving out to the files from time to time is a good idea as is backing up the catalog. Just choose a few thousand, 7 thousand, or all images and hit Save, have a nice hot chocolate on your way to bed....:)

Similar Messages

  • "Date Modified" for all files being changed if "Automatically write to XMP" is on

    Recently upgraded from LR3 (v3.4.1) from LR2 on OSX 10.6.8 and have always had Catalog Settings > Automatically write changes into XMP turned on.
    When browsing existing JPG files in my Library (no Develop changes, no keywording, no Presets, no Import), LR3 is writing to disk — i.e., when I look at files in Finder, almost every viewed file’s “Date Modified” is being set to today’s date and time. (It actually creates a .swp file, then changes it's name back to .jpg)
    This is really bad, as it's making it impossible for me to use Finder to figure out when I last worked with a file, it is triggering needless Time Machine and Backblaze backups, and unnecessarily churning my disk.
    If I turn off "Automatically write..." this behavior stops. Per David Marx at thelightroomlab.com, I tried turning off this preference, manually doing a "Save Metadata to File" for all files, letting that complete, then turning the preference back on. This does not solve the problem.
    Per a suggestion at photoshop.com, I used ExifTool to see what changes LR was writing to a sample file; from the diff below, you can see that LR is adding a bunch of new fields as well as moving other fields around. But my point is that LR3 should never overwrite a file on disk if all I am doing is browsing thru them.
    Is anyone else seeing this? Any ideas would be greatly appreciated!
    -- David
    diff Exif5609_original Exif5609_update
    2c2
    < FileName: DSC_5609_original.JPG
    > FileName: DSC_5609_update.JPG
    5,6c5,6
    < FileModifyDate: 2009:11:27 21:32:54-08:00
    < FilePermissions: rwxr-xr-x
    > FileModifyDate: 2011:08:07 22:06:47-07:00
    > FilePermissions: rw-r--r--
    27a28,29
    > ShutterSpeedValue: 1/200
    > ApertureValue: 7.1
    55d56
    < SerialNumber: 3209521
    75d75
    < Lens: 18-200mm f/3.5-5.6
    185,188d184
    < UserComment:
    < SubSecTime: 00
    < SubSecTimeOriginal: 00
    < SubSecTimeDigitized: 00
    211a208,299
    > XMPToolkit: Adobe XMP Core 5.2-c004 1.136881, 2010/06/10-18:11:35
    > CreatorTool: Ver.1.00
    > MetadataDate: 2011:08:07 22:06:47-07:00
    > SerialNumber: 3209521
    > LensInfo: 18-200mm f/3.5-5.6
    > Lens: 18.0-200.0 mm f/3.5-5.6
    > ImageNumber: 26634
    > RawFileName: DSC_5609.JPG
    > SavedSettingsName: Import
    > SavedSettingsType: Snapshot
    > SavedSettingsParametersVersion: 6.4.1
    > SavedSettingsParametersProcessVersion: 5.0
    > SavedSettingsParametersWhiteBalance: As Shot
    > SavedSettingsParametersIncrementalTemperature: 0
    > SavedSettingsParametersIncrementalTint: 0
    > SavedSettingsParametersExposure: 0.00
    > SavedSettingsParametersShadows: 0
    > SavedSettingsParametersBrightness: 0
    > SavedSettingsParametersContrast: 0
    > SavedSettingsParametersSaturation: 0
    > SavedSettingsParametersSharpness: 0
    > SavedSettingsParametersLuminanceSmoothing: 0
    > SavedSettingsParametersColorNoiseReduction: 0
    > SavedSettingsParametersChromaticAberrationR: 0
    > SavedSettingsParametersChromaticAberrationB: 0
    > SavedSettingsParametersVignetteAmount: 0
    > SavedSettingsParametersShadowTint: 0
    > SavedSettingsParametersRedHue: 0
    > SavedSettingsParametersRedSaturation: 0
    > SavedSettingsParametersGreenHue: 0
    > SavedSettingsParametersGreenSaturation: 0
    > SavedSettingsParametersBlueHue: 0
    > SavedSettingsParametersBlueSaturation: 0
    > SavedSettingsParametersFillLight: 0
    > SavedSettingsParametersVibrance: 0
    > SavedSettingsParametersHighlightRecovery: 0
    > SavedSettingsParametersClarity: 0
    > SavedSettingsParametersDefringe: 0
    > SavedSettingsParametersHueAdjustmentRed: 0
    > SavedSettingsParametersHueAdjustmentOrange: 0
    > SavedSettingsParametersHueAdjustmentYellow: 0
    > SavedSettingsParametersHueAdjustmentGreen: 0
    > SavedSettingsParametersHueAdjustmentAqua: 0
    > SavedSettingsParametersHueAdjustmentBlue: 0
    > SavedSettingsParametersHueAdjustmentPurple: 0
    > SavedSettingsParametersHueAdjustmentMagenta: 0
    > SavedSettingsParametersSaturationAdjustmentRed: 0
    > SavedSettingsParametersSaturationAdjustmentOrange: 0
    > SavedSettingsParametersSaturationAdjustmentYellow: 0
    > SavedSettingsParametersSaturationAdjustmentGreen: 0
    > SavedSettingsParametersSaturationAdjustmentAqua: 0
    > SavedSettingsParametersSaturationAdjustmentBlue: 0
    > SavedSettingsParametersSaturationAdjustmentPurple: 0
    > SavedSettingsParametersSaturationAdjustmentMagenta: 0
    > SavedSettingsParametersLuminanceAdjustmentRed: 0
    > SavedSettingsParametersLuminanceAdjustmentOrange: 0
    > SavedSettingsParametersLuminanceAdjustmentYellow: 0
    > SavedSettingsParametersLuminanceAdjustmentGreen: 0
    > SavedSettingsParametersLuminanceAdjustmentAqua: 0
    > SavedSettingsParametersLuminanceAdjustmentBlue: 0
    > SavedSettingsParametersLuminanceAdjustmentPurple: 0
    > SavedSettingsParametersLuminanceAdjustmentMagenta: 0
    > SavedSettingsParametersSplitToningShadowHue: 0
    > SavedSettingsParametersSplitToningShadowSaturation: 0
    > SavedSettingsParametersSplitToningHighlightHue: 0
    > SavedSettingsParametersSplitToningHighlightSaturation: 0
    > SavedSettingsParametersSplitToningBalance: 0
    > SavedSettingsParametersParametricShadows: 0
    > SavedSettingsParametersParametricDarks: 0
    > SavedSettingsParametersParametricLights: 0
    > SavedSettingsParametersParametricHighlights: 0
    > SavedSettingsParametersParametricShadowSplit: 25
    > SavedSettingsParametersParametricMidtoneSplit: 50
    > SavedSettingsParametersParametricHighlightSplit: 75
    > SavedSettingsParametersSharpenRadius: +1.0
    > SavedSettingsParametersSharpenDetail: 25
    > SavedSettingsParametersSharpenEdgeMasking: 0
    > SavedSettingsParametersPostCropVignetteAmount: 0
    > SavedSettingsParametersGrainAmount: 0
    > SavedSettingsParametersLensProfileEnable: 0
    > SavedSettingsParametersLensManualDistortionAmount: 0
    > SavedSettingsParametersPerspectiveVertical: 0
    > SavedSettingsParametersPerspectiveHorizontal: 0
    > SavedSettingsParametersPerspectiveRotate: 0.0
    > SavedSettingsParametersPerspectiveScale: 100
    > SavedSettingsParametersConvertToGrayscale: False
    > SavedSettingsParametersToneCurveName: Linear
    > SavedSettingsParametersCameraProfile: Embedded
    > SavedSettingsParametersCameraProfileDigest: D6AF5AEA62557FCE88BC099788BBD3CC
    > SavedSettingsParametersLensProfileSetup: LensDefaults
    > SavedSettingsParametersToneCurve: 0, 0, 255, 255
    > IPTCDigest: d41d8cd98f00b204e9800998ecf8427e
    228,230d315
    < SubSecCreateDate: 2009:11:27 21:32:54.00
    < SubSecDateTimeOriginal: 2009:11:27 21:32:54.00
    < SubSecModifyDate: 2009:11:27 21:32:54.00
    http://feedback.photoshop.com/photoshop_family/topics/lr3_date_modified_for_all_files_bein g_updated_when_browsing_photos_if_catalog_settings_automatically_write_changes_into_xmp_is /replies/6313647

    clvrmnky wrote:
    davidpope007 wrote:
    Then when LR3 loaded my old LR2 images into memory, it "dirtied" the in-memory copy of the file by adding in these new LR3 XMP fields. Then, because I had "Automatically write XMP" on, it said "I better write these changes to disk".
    Yuck. As a former software engineer, this is very bad software engineering.
    It should wait until the user dirties the file (via Develop, keywords, etc.) before presuming to add a bunch of metadata fields that are unique to the new version of LR3.
    Well, I'm a current software developer, and this is, really, a perfectly reasonable thing to do. It is a reasonable trade-off for a convenient feature required by a small subset of users.
    Yes, in most cases the in-memory copy should "never" be dirtied unless the user makes a gesture of some sort, but like I said earlier, this option (once set by the user) sets up the situation where this gesture becomes implicit. This is a clear trade-off for the sake of convenience. And if the XMP is out of date and needs to be updated en masse, so be it.
    The fact is, there is no easy way around this. Do we save up /every/ dirty buffer somehow until you make a gesture that /might/ require the XMP to be up-to-date before acting on that gesture? Now we have to worry about unflushed buffers if something goes wrong and the app exits. Do we save the buffers to the DB? Now we have to block some calls to make another blocking call to flush some or all of those to DB, and then write some or all of it out to one or more files. In what order? What if there is a gesture to have X files with up-to-date XMP and some or all of those are in unflushed buffers, unflushed DB writes or we have to wait for the DB.
    As you can see, this is a transactionality nightmare, and the easiest and safest thing to get what the user wants (i.e., up-to-date XMP for the purpose of talking to a third-party XMP aware app) is to simply update the sidecar or XMP block in an atomic manner using the correct file IO. The file will have to change at some point, so it may as well be now.
    [Thanks to both of you for your detailed replies. I am aware of the need for tradeoffs so when you say the approach taken is quite reasonable, I do believe you. I also apologize in advance for the length of the following and am extremely aware of the time it must have taken you to compose the above replies, but I'm going to add a bit more, if only for my own piece of mind and in hopes of coming up with a solution for my workflow.]
    From my naive point of view, I was expecting the answer to be simply "don't raise the XMPDirtyFlag upon reading in a file". Obviously if your architecture requires you to "upgrade to latest XMP format" upon read, and another part of the system auto-detects "out of date XMP", then it's going to write those changes to disk.
    But it didn't need to be designed that way. LR obviously has mechanisms to know when a user has made a change to XMP so it is able to write XMP changes to disk only when necessary.
    The promise (to me) of "Automatically Write XMP changes to disk" was to auto-save my changes, and not those made for any internal (i.e., XMP versioning related) changes.
    Perhaps the premise is that it is LR3's job to update an individual file's XMP to the latest version so that other XMP-aware apps can make use of it? I would argue that those third-party XMP-aware apps already have to know how to deal with all prior versions of XMP, so LR3 should just leave well enough alone.
    You asked if my problem with your approach was that it was "inelegant"; not at all, it is based on my own perception of what I need from my workflow, so let me describe that so maybe we can find a better way:
    * Part of the appeal of LR to me is that it preserves my original file as it came off the memory card, allowing me to move to a different workflow/toolset in 2025 if I choose to do so
    * However, with all of changes contained in a single database file, I'm concerned about rare (but possible) corruption, so to mitigate this risk, I let LR backup my database weekly and it's also backed up continuously in the cloud via Backblaze
    * Even with backups of the database, there is still a chance that I could lose changes made to individual files (e.g., LR corrupts the DB and I have to go back to last week's DB)
    * Thus the appeal of the "auto-write to XMP" flag -- that way critical changes (develop, crop, keywords) are saved on a per-file basis; I liked the "automatic" part of this (as opposed to a manual save) because then I don't have to teach others in my family how to manually save XMP changes
    * A nice side-effect of this setting is now when I use Finder to find a file and double-click on it to edit it in Photoshop, all my develop changes are right there; (in other words, I like the flexibility of not having to fire up LR in order to just invoke PS from within it); also when I use Bridge I see all the keywords there
    * So with LR2, I had gotten used to what I thought was the best of all worlds -- autosave of changes at the file level via XMP + raw negatives untouched (i.e., Date Modified == the date I took the picture); this allows me to use operating-system-level tools -- Finder -- to locate/search for files
    * Now I upgrade to LR3 and I'm finally now understanding that a concept "XMP versioning" is going to result in changes to many, but not all my files. (That's something else that's annoying about this issue -- I open up the Grid and browse a folder of files, and only seemingly random ones I've cursored over seem to get written to disk -- if it's so urgent that LR3 update the XMP, then it should do it for all the files in the catalog or at least in that directory)
    Here's a screenshot from Finder of what I see everytime I look at this folder:
    * So now I have to assume that each new version of XMP and/or LR is going to touch my files on disk. Sigh.
    * What I don't like about this is that it is ruining the promise of "untouched raw negative". Yes, the image data is untouched -- which I agree is most of the benefit; but the file has been touched.
    * Perhaps you might empathize a bit more if you imagined that someone went thru all your source code or Word files and randomly changed the date to "today" because you upgraded compilers or moved to Word 2011.
    I agree all of this would be solved by having an XMP sidecar file for JPGs, but you indicate that's not going to happen.
    You've also alluded to the solution of "resetting the Date Modifed" to it's original value -- which I believe is what Finder does when you move or copy a file -- but that that is fraught with issues as well. I believe you when you say there are issues, but again the naive part of me wonders why that soultion would be so bad...
    I just thought of another potential solution -- turning on Date Created in Finder -- but it turns out that's changed, too.
    I am really at a loss as to what to do and would welcome your suggestions.
    Thanks again and kind regards,
    -- David

  • I bought a new MacBook Pro several months ago.  I keep losing my wireless connection (my wife, sitting several feet from me has no problem with her iPad2).  I find the quickest fix ix to turn Airport off and back on.  Very annoying.   Suggestions please?

    I bought a new MacBook Pro several months ago.  I keep losing my wireless connection (my wife, sitting several feet from me has no problem with her iPad2).  I find the quickest fix ix to turn Airport off and back on.  Very annoying.   Suggestions please?

    What kind of wireless router are you using? more importantly which protocol are you connecting with? Are you and wife connecting using the 2.4Ghz band? or do you have a dual band router that offers the 5GHZ band?  Are you both connecting vie 802.11 a/b/g or n?
    The best thing to do is to go into SYSTEM PREFERENCES and select NETWORK, then select AIRPORT and click on the ADVANCED button.
    Under the AirPort tab you should delete all the preferred networks and only add back in your network with the proper security settings and passwords.
    If you hold down the option key on your keyboard while clicking on the airport icon at the top on your macbook pro. you'll seesome data that will tell you what band and mode you're connecting at, as well as in an indication of signal strength (RSSI) if you write down and post back that information it'll tell us what's going on.

  • New micro sd card turn write protected same day

    I bought an sd card and formatted it with my blackberry curve 8520 and it formatted. I started copying music t it. After, I tried deleting something i did not want anymore and the card gave me errors. I used my pc and it said the card was write-protected. I had two micro sd cards (8GB) turn write protected for no reason. My internet is connected 24/7 and I use microsoft essential up-to-date so i dont see why my card have to turn write protected. I've tried changing security settings in phone on and off later but its still write protected. I've used every means of formatting from ubunto to windows 7. If I delete files with pc or the phone, it disappears from the screen but come back again. None of the file are corrupted cos they work well but i cant delete nor format anything. What is the problem here..?..

    Hi eChang,
    Welcome to the Community,
    Are you holding a BIS or BES account. If you have a BIS account  Please try this :
    1. Go to Options > Security > Encryption > Disable All .
    2. Go to Options > Device > Storage > Unmark Media Card Compression then Save.
    Then try to Format it in your device.BlackBerry device software 4.2 to 5.0:
    From the Home screen of the BlackBerry smartphone, click Options > Memory or Options >Advanced Options > Memory  (Choose the option that appears on the BlackBerry smartphone).
    2.Display the menu and click Format Card.
    Note: If the Format Card option does not appear on the menu, skip step 3 and perform the procedure that follows.
    3.   A warning message appears, asking if you are certain you would like to format the card ClickYes to continue.
    If the Format Card option does not appear on the menu, complete the following steps:
    On the Media Card screen, set the Mass Storage Mode Support field to Off.
    Display the menu and click Save. The Media Card screen closes automatically.
    Click Media Card to reopen the Media Card screen.
    To format the media card, display the menu and click Format Card.
    A warning message appears, asking if you are certain you would like to format the card. ClickYes to continue.
    See if it allows.
    Good Luck
    Prince
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • The screen on my ipod touch is stuck zoomed in. I turned it off and back and its still stuck zoomed in. I also tried to reset it and that didn't work either. Please help.

    The screen on my ipod touch is stuck zoomed in. I don't know how it happened I just looked down and it was like that. I have turned it off and back and even reset it but it still keeps zooming back in each time I turn it on. I can't unlock it because I can't see the numbers and it won't let me move around the screen. Please help.

    This is asked and answered often.  The foru search bar is on the right side of this page.
    It is also covered in the manual - zoom feature:
    iPod touch User Guide (For iOS 4.3 Software)
    Double tap with three fingers.

  • When I type in my password into the login screen I get the rainbow pinwheel and then the screen turns gray and goes back to account selection... How do I access my account?

    Today I was doing my chemistry homework when all of a sudden my mid 2011 MacBook pro running Lion 10.7.4 started going very very VERY slowly to a point where it was unusable. I restarted my computer and went to type in my password. When I did this, the computer recognized the password and began to boot yet the pinwheel came on and the screen turned gray and went back to the account selection screen. It continues to do this everytime I enter my password and I can no longer access my account. How do I fix this.

    You can take some of the steps here, #4, #5 or even trying a #18
    Step by Step to fix your Mac
    but I suspect your going to first have to create a data recovery drive
    Create a data recovery, undelete boot drive
    to get your data off the machine,
    then do a #20 to eliminate the bad sectors as that's why your getting the "pinwheel" it's getting a delay reading from the drive, right when your trying to log in too, what a bad spot for it to happen.
    Step by Step to fix your Mac

  • IPod  shuffle 2nd gen only plays 15 min then stops. I turn it off then back on. It thens plays 15 min then stops. What can I do to fix this?

    2nd gen iPod shuffle stops during play back every 15 min. What can I do to fix it? I turn it off then back on, but it still only plays 15 min then stops.

    Thank you....I have tried a few things but I will try to reset and restore.  
    lllaass wrote:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                             
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          
    lllaass wrote:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                             
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

  • I have a Seagate Freeagent 1TB external drive that ejects it's self in the middle of the time machine backup, then disappears and can't be found unless I turn it off and back on again

    I have a Seagate Freeagent 1TB external drive that ejects it's self in the middle of the time machine backup, then disappears and can't be found unless I turn it off and back on again. Any ideas?

    Hmmm.. sorry to jump in but...
    I Wish I had seen this before I got mine.
    Mine has been doing this auto eject stuff too.
    I think I just plugged it in and TM let me select it but is it possible
    I should have reformatted it with DU first, like with all the WD drive problems ?
    Is it too late for that ?
    Or just try to return it or get rid of it ?
    TIA

  • I bought iphone from Canada but now I'm in Thailand and I upgraded to ios6 but I couldn't turn on wifi and back up on icloud so I want to know that how can I claim my iphone with apple care because no apple store in Thailand. Thank you.

    I bought iphone from Canada but now I'm in Thailand and I already upgraded to ios6 but It doesn't work well.I couldn't turn on wifi and back up on icloud so I want to know how can I do with my iphone because no apple store in Thailand.Can I send it to any apple care which is easy and near my country? Thank you.

    You can find a local shop and pay to get it fixed or you will need to send the phone to someone you know in Canada and have them take the phone into Apple for service. Then they will need to ship the phone back to you. The warranty is based in the original country of purchase.
    Decide which is your best option.

  • My screen turns white and my functions lag on me for instence i try going to my ipod and it turns on but then turns right off going back to main screen. when i click on my settings it takes forever to open up, if opening at all.

    my screen turns white and my functions lag on me for instence i try going to my ipod and it turns on but then turns right off going back to main screen. when i click on my settings it takes forever to open up, if opening at all.

    Restore the phone --> http://support.apple.com/kb/HT1808
    If this does not resolve the problem you have a hardware problem.

  • Long story short. plugged i phone into my computer and my sons itune acct. came up ithought it was mine and hit restorenow i have all his stuff and mine is gone. turns out i never backed up. Help

    Long story short. plugged my i phone into my computer and my sons itune acct. came up ithought it was mine and hit restore now i have all his stuff and mine is gone. turns out i never backed up. Help. I have a new ipad which had 238 photos and it only would share 190 with my phone. I pretty much just deleted his stuff, reset to dfault to get my clock and calendar back. The biggest problem now is my old icons show up but wont launch so I figured I coul delete them then re install them but HIS apple account keeps showing up with his account info. How do I change that to get my name and password back on there?
    Stupid I know but I cant take it back.

    Hi there cz1959!
    I'm sorry to hear about the loss of your data. It sounds like you need to sign into your own Apple ID again on the iPad, then download your previously purchased iPad apps again. We have an article on how to do exactly this, and it can be found right here:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/ht2519
    Also, you may want to consider signing up for a free iCloud account and turning on automatic backups. This will allow you to back up your iPad in the background and without connecting to a computer, so that this issue of data loss will be minimized if this sort of issue ever happens again:
    iCloud: Backup and restore overview
    http://support.apple.com/kb/ht4859
    I hope this information helps resolve your situation. Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • How to write the nodevalue back to xml file?

    Hi, Everybody:
    These are two packages I used. javax.xml.parsers.*,org.w3c.dom.*
    Now I use "setNodeValue("abc") to set the node value to "abc". But it is not really saved back into XML file. It only change the node value in memory.
    How to write the changes back to XML file? Thank you very much for your help.
    Michelle

    * Version : 1.00
    * File Purpose : Given the xml file loads into dom and recreate the file with the updated values.
    * Developer : Kashif Qasim : 25/july/04
    * Modify detail :
    import java.lang.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    import org.w3c.dom.*;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.*;
    public class XMLWriter
    private String displayStrings[] = new String[5000];
    private int numberDisplayLines = 0;
    private Document document;
    //private final Node c;
    public synchronized void displayDocument(String uri,Vector UpdatedValues,String getTaskID)
    try {
    DOMParser parser = new DOMParser();
    parser.parse(uri);
    document = parser.getDocument();
    display(document, "",UpdatedValues);
    } catch (Exception e) {
    e.printStackTrace(System.err);
    ReadXmlConfig objReadXmlConfig = null;
    FileWriter filewriter = null;
    try {
    filewriter = new FileWriter(uri);
    for(int loopIndex = 0; loopIndex < numberDisplayLines; loopIndex++){
    filewriter.write(displayStrings[loopIndex].toCharArray());
    //System.out.println("displayStrings[loopIndex].toCharArray() "+displayStrings[loopIndex].toString());
    //filewriter.write("\n");
    filewriter.close();
    System.gc();
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSLog("File updated for "+getTaskID+" succesfully, file is closed now ");
    } catch (IOException e) {
    System.err.println("Caught IOException: " + e.getMessage());
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSErrorLog("File updated FAILED for "+getTaskID+". Reason for file error "+e.toString());
    }finally {
    if (filewriter != null) {
    System.out.println("Closing File");
    objReadXmlConfig =null;
    try{
    filewriter.close();
    }catch(IOException e){
    System.err.println("Caught IOException: " + e.getMessage());
    } else {
    System.out.println("File not open");
    private void display(Node node, String indent, Vector UpdtRecs)
    if (node == null) {
    return;
    int type = node.getNodeType();
    NodeList nodeList = document.getElementsByTagName("QueryParm");
    int TotalRecs = UpdtRecs.size();
    switch (type) {
    case Node.DOCUMENT_NODE: {
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] +=
    "<?xml version=\"1.0\" encoding=\""+
    "UTF-8" + "\"?>";
    numberDisplayLines++;
    displayStrings[numberDisplayLines] += "\n";
    display(((Document)node).getDocumentElement(), "",UpdtRecs);
    break;
    case Node.ELEMENT_NODE: {
    if(node.getNodeName().equals("QueryParm")) {
    for(int i =0 ; i< nodeList.getLength() ; i++)
    Node nodeQry = nodeList.item(i);
    NamedNodeMap nnp = nodeQry.getAttributes();
    for(int j= 0 ; j < nnp.getLength() ; j++)
    Attr atr = (Attr) nnp.item(j);
    if(atr.getName().equalsIgnoreCase("value_"+(i+1)))
    //System.out.println(atr.getName() +" : " + atr.getNodeValue() );
    atr.setNodeValue(UpdtRecs.get(i).toString());
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] += "<";
    displayStrings[numberDisplayLines] += node.getNodeName();
    int length = (node.getAttributes() != null) ?
    node.getAttributes().getLength() : 0;
    Attr attributes[] = new Attr[length];
    for (int loopIndex = 0; loopIndex < length; loopIndex++) {
    attributes[loopIndex] = (Attr)node.getAttributes().item(loopIndex);
    for (int loopIndex = 0; loopIndex < attributes.length; loopIndex++) {
    Attr attribute = attributes[loopIndex];
    displayStrings[numberDisplayLines] += " ";
    displayStrings[numberDisplayLines] += attribute.getNodeName();
    displayStrings[numberDisplayLines] += "=\"";
    displayStrings[numberDisplayLines] += attribute.getNodeValue();
    displayStrings[numberDisplayLines] += "\"";
    displayStrings[numberDisplayLines]+=">";
    numberDisplayLines++;
    NodeList childNodes = node.getChildNodes();
    if (childNodes != null) {
    length = childNodes.getLength();
    indent += " ";
    for (int loopIndex = 0; loopIndex < length; loopIndex++ ) {
    display(childNodes.item(loopIndex), indent,UpdtRecs);
    break;
    case Node.CDATA_SECTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<![CDATA[";
    displayStrings[numberDisplayLines] += node.getNodeValue();
    displayStrings[numberDisplayLines] += "]]>";
    numberDisplayLines++;
    break;
    case Node.TEXT_NODE: {
    displayStrings[numberDisplayLines] = "";
    String newText = node.getNodeValue().trim();
    if(newText.indexOf("\n") < 0 && newText.length() > 0) {
    displayStrings[numberDisplayLines] += newText;
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    case Node.PROCESSING_INSTRUCTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<?";
    displayStrings[numberDisplayLines] += node.getNodeName();
    String text = node.getNodeValue();
    if (text != null && text.length() > 0) {
    displayStrings[numberDisplayLines] += text;
    displayStrings[numberDisplayLines] += "?>";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    if (type == Node.ELEMENT_NODE) {
    displayStrings[numberDisplayLines] = indent.substring(0,
    indent.length() - 4);
    displayStrings[numberDisplayLines] += "</";
    displayStrings[numberDisplayLines] += node.getNodeName();
    displayStrings[numberDisplayLines] += ">";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    indent += " ";
    public static void main(String args[])
    Vector xmlValue = new Vector();
    xmlValue.add(0,"Kashif");
    xmlValue.add(1,"Qasim");
    //displayDocument("NewMediation.xml",xmlValue);
    <?xml version="1.0" encoding="UTF-8"?>
    <Mediation>
    <Task1>
    <Source>
    <SourceDriver>com.microsoft.jdbc.sqlserver.SQLServerDriver</SourceDriver>
    <SourceConnection>jdbc:microsoft:sqlserver://10.2.1.58:1433;DatabaseName=MTCVB_HDS;</SourceConnection>
    <SourceUser>sa</SourceUser>
    <SourcePassword>sa</SourcePassword>
    <Table>
    <SourceTable>t_Agent</SourceTable>
    <SourceQuery><![CDATA[SELECT SkillTargetID,PersonID,PeripheralID,EnterpriseName,PeripheralNumber,Deleted,TemporaryAgent,AgentStateTrace,ChangeStamp FROM t_Agent where SkillTargetID > {value_1} order by SkillTargetID]]>
    </SourceQuery>
    <SourceParm BusinessRule="" ColumnName="SKILLTARGETID" ColumnNumber="1" DataType="Numeric" DefaultValue="0" Format="mm/dd/yyyy xx:xx:xx XX">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERSONID" ColumnNumber="2" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALID" ColumnNumber="3" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="ENTERPRISENAME" ColumnNumber="4" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALNUMBER" ColumnNumber="5" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="DELETED" ColumnNumber="6" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="TEMPORARYAGENT" ColumnNumber="7" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="AGENTSTATETRACE" ColumnNumber="8" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="CHANGESTAMP" ColumnNumber="9" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <QueryParm FldName_1="SkillTargetID" FldType_1="Number" value_1="0">
    </QueryParm>
    </Table>
    </Source>
    </Task1>
    </Mediation>
    The QueryParm values are updated thru this code :)
    Hope it helps u ...

  • Hi my ipad 3 16gb with iso7 turns of then straight back on can anyone help please

    Hi my ipad 3 16gb with iso7 turns of then straight back on can anyone help please

    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.

  • Is anyone having issues syncing the iPhone wifi hot spot to iPad, Mac, Etc..?  I constantly have to turn it off and back on to get them to connect.  I with it was a little more seamless... Thoughts?

    Is anyone having issues syncing the iPhone wifi hot spot to iPad, Mac, Etc..?  I constantly have to turn it off and back on to get them to connect.  I with it was a little more seamless... Thoughts?

    Thanks for the swift reply, I have been looking online and a loose plug seems to be somewhat of an issue with many, I hope mine is actually a problem and not what others are experiencing. It's taken me this long to even reach out for the simple fact I HATE being a complainer but this is just horrible.
    Do you have an iPad 3 as well? And is yours not experiencing any issues close to mine?
    Thanks again!

  • My camera ***** after upgrating to ios 7.0.2. It turns black with the back camera.does anyone experienced this?

    My camera ***** after upgrating to ios 7.0.2. It turns black with the back camera.does anyone experienced this?

    Hi, chen zhuang. 
    Thank you for the question.  This article will help your troubleshoot the camera issue with your iPhone.  See the section labeled Camera is not functioning.
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    If none of the solutions in the article resolve the issue, see the section labeled Issue not resolved.
    Cheers,
    Jason H

Maybe you are looking for

  • Mass change - Tcode MASS

    Hi, Would like to know if the fields/objects which i wanted to mass change is not found in transaction code MASS, is there any way i can INCLUDE or ADD into MASS? Thanks regards, JL

  • Workshop 8.1 and I/O operations

    Hi everybody. Does anyone have a glue about why i/o operations are slowly inside a running Workshop instance than "outside" it ? I've an I/O intensive process that runs in 2-3 seconds when using a main method of a simple Java Class. When i try to run

  • I can't sign in to my itunes account. I had email sent to reset password but none came through

    How can I sign in to my account if email sent to reset password does not get sent from itunes to my email?

  • I have compose render proplems in AE CS6

    i used to render easy in a lot of videos but this one i added some composes into it and ended my work and it was like that but when i started render in normal settings hope some1 help me fast

  • A group writing at the same time on one project

    Hello! First: Adobe Story is a wonderful and helpful programme! We've just discovered it and we are using it for our movie project. Question: We were wondering if it's possible that a group is working on a project at the same time. If someone is work