Single Item Access

I am relatively new to XML / JAXP technologies and was wondering if there is a syntax available that would permit retrieving a node by specifying the ancestory of the node? For example, if I had the following XML:
<?xml ?>
<person name="Daffy">
<address>
<city>Hollywood</city>
<state>CA</state>
<zip>90210</zip>
</address>
</person>
<person name="Donald">
<address>
<city>Pensicola</city>
<state>FL</state>
<zip>01209</zip>
</address>
</person>
Is there a way to retrieve the city for Donald in a single access such that I don't have to walk the tree? Maybe use getElementsByTagName() and specify the ancestory with the value Donald somehow?
By the way, is it considered good form to not put a value after a node that has children?
Thanks,
Derek

just wrote a rough code..
NodeList list=getElementsByTagName("person");
for(int i=0;i<list.getLength();i++)
  Element temp= list.item(i);
  if(temp.getAttribute("name").equals("Donald "))
  break;
}

Similar Messages

  • Exchange Online Archive and Single Item recovery

    We are currently looking to implement online archiving in Exchange 2010.
    From my perspective,  we are doing it to relocate the older messages to some cheaper storage,  while making primary mailbox sizes are little more manageable.
    Management however,  want to ensure that once an item is moved to the online archive that it cannot be permanently deleted until after a 7 year retention period (for discovery purposes).
    Journaling isn't an option at this point..
    We have an Archive RPT which moves the items to the users archive after 90 days.
    We have another RPT which will Delete items from the Archive after 7 years (Delete no Recovery).
    We then have "Keep deleted Items for", set to 30 Days on the Primary Mailbox Database.
    and then have "Keep deleted Items for", set to 7 years (2555 Days) on the Archive Database(this is so that items are not immediately deleted if the user manually deletes from the archive).
    Obviously with this setup,  users will be able to purge items from the "Deletions" sub folder (Recover Deleted Items) if they want to remove it from the archive.
    My understanding is that if I enable Single Item Recovery for everyone,  then the items that the user might remove from the "Deletions" sub folder will be transparently moved to the "Purges" sub folder, and are therefore discoverable
    if required,  up until the retention period of each database (30 days for Primary mailbox, 7 years for archive).
    This sounds like exactly what we are after.
    Thus my questions;
    Apart from the obvious storage implications of doing this (7 years is alot of email),  are there any other issues\risks associated with going down this method for email retention?
    Is there a better way of achieving what we are after?  I dont suppose we could completely restrict deletion access to the users archive completely for example?
    If a user was to drag an item back into their primary mailbox.. and then delete it before the Managed Folder Assistant moved it back to the archive..  Would that be a potential hole in the retention requirement?
    Thanking you all in advance for your insight..

    You may want to use Litigation Hold to have users unable to delete the item permanently.
    http://blogs.technet.com/b/exchange/archive/2011/08/16/retention-hold-and-litigation-hold-in-exchange-2010.aspx
    I know it works on Active mailbox but not sure if the same attributes available for Archive Database. Just run the cmdlet and see if it can be done.
    Where Technology Meets Talent

  • How do I allow all users on a single computer access to music without duplicating songs?

    There has got to be a way to allow all users on a single computer access to a single -shared- directory without DUPLICATING the songs, but I can't figure it out.  Tried Edit | Preferences | Advanced | Change, but the songs do not show up.  Tried Sharing the folders. Tried Public Folders.  Just want all my songs in one place to save space, prevent duplicates.  Please advise.

    Move the iTunes folder from its current location to, say, C:\iTunes.
    With each account in turn press and hold down shift and click the icon to start iTunes, keep holding until asked to Choose or create a library.
    Choose the library at C:\iTunes, or wherever you put it.
    Job done.
    tt2

  • How do I create a Launchpad folder for a single item?

    Some items that came with a few apps have their own folder in Launchpad  - "AppName (Other)".
    Is there a way to create a folder in Launchpad with a single item?
    I tried dragging one item to another and got a folder but as soon as I removed one of the items, the folder disappeared too.
    Thanks in advance.
    Best regards,
    Barry
    <Edited by Host>

    Hi Shootist007,
    Thanks for your response.
    Trouble is, the app is already inside a folder.  It came with another app and both are in their own folder, within the Applications folder.
    At your suggestion, I even tried placing it within its own folder, within the app's folder, within the Applications folder.  Still seeing two separate icons in Launchpad with no folder.
    Both show up in Launchpad as separate things.  What I'd like to do is have that secondary app in a Launchpad folder.
    Hi Hpr3,
    Thank you but those aren't email addresses in my signature - they're URLs.  No fear of bots.
    But thanks for the thought.
    Best regards,
    Barry
    <Edited by Host>

  • Deleting a single item from the trash.

    Hello
    Is there a way to delete a single item from the trash, while leaving all other items in the trash?

    I don't believe so and I'm not sure why you would want to.
    Items should not be placed in the Trash unless you intend to delete the items. The Trash is not designed for and should not be used as a temporary storage location.

  • Display of  icons in the items of dropdownListBox for a single item

    Dear BSP Gurus,
    Do you know if it is possible to display icons in the items of dropdownListBox for every single item?
    To assign and display icon to buttons I do:
        lv_image->id = 'UserSelectionCancel2'.
        lv_image->src = '/sap/public/bc/icons/s_B_OKYE.gif'.
        lv_image->tooltip = ''.
        clear lv_image_string.
        lv_image_string = lv_image->IF_BSP_BEE~RENDER_TO_STRING( page_context ).
                  %>
                  <xhtmlb:toolbarButton id      = "<%= ywfx1_b_bcontinueWF %>"
                                        design  = "STANDARD"
                                        text    = "<%= lv_image_string %> <%= otr(YWF11/ContWF) %>"
    But I could not managed to do it for the " <htmlb:dropdownListBox ...".
    We have application developed in ABAP WebDynpro and there it is possible, so I want to do exactly the same with BSP.
    Any idea?
    Thanks in advance,
    Valentin

    Hallo Alexandre,
    But what if I use table for defining the items?
    Like:
    htmlb:dropdownListBox id  = "DropDownCommands"
                      table             = "<%= application->mt_commands %>"
                      nameOfKeyColumn   = "VAL_COMMAND".."
    Where "application->mt_commands" is table of strings?
    Would it be some how possible?
    Regards,
    Valentin

  • I can't clear single item in Location Bar History

    I can't clear single item in Location Bar History. I use Firefox 3.6.13 on Mac 10.6.5.
    I do select the item in location bar, press Shift and delete keys, but it delete the item only temporary...
    My Firefox Privacy pref indicate:
    - Use custom settings for history
    - Suggest History when using location bar

    Entries in the location bar drop down list with a yellow (blue on Mac) star at the right end are bookmarks.<br />
    You can remove such a bookmarked item that shows in the list if you open that url in a tab and click the yellow star in the location bar.<br />
    This will open the Edit This Bookmark dialog and you can click the Remove button to remove the bookmark.<br />
    This can also be a problem with the file places.sqlite that stores the bookmarks and the history.
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • How can I add the logo image for a single item in an RSS feed?

    Hello,
    I am an administrator of iTunes U at the University of Minnesota.
    Before transitioning new public site, we are trying to figure out how to put a logo image into RSS feeds.
    We use our server to makes xml codes to create RSS feeds for podcasts.
    We successfully put a logo image for a collection in a RSS feed, but putting a logo image for a single item did not work.
    Below is the part of the xml code for the logo image for a single item, which is created by our server. I deleted other parts of xml code for your convenience.
    <item>
    <title>Plagiarism</title>
    <itunes:image href="http://picture.funnycorner.net/funny-pictures/6041/dolphin-vs-cow-swimmin g-contast.jpg" />
    <enclosure url="http://mediamill.cla.umn.edu/mediamill/download.php.mp3?file=87504.mp3" length="8544508" type="audio/x-mp3" />
    <guid>http://mediamill.cla.umn.edu/mediamill/download.php.mp3?file=87504.mp3</guid>
    <image></image>
    </item>
    We tried both <itunes:image href="http://picture.funnycorner.net/funny-pictures/6041/dolphin-vs-cow-swimmin g-contast.jpg" /> or <image>http://picture.funnycorner.net/funny-pictures/6041/dolphin-vs-cow-swimming-conta st.jpg</image>.
    Both did not work.
    Can anyone help?
    Thank you for your help in advance!!
    Seogjoo

    Haven't created too many podcasts, but in this one
    http://itunes.apple.com/us/podcast/connecticut-college-sculpture/id372414245
    or
    itpc://video.conncoll.edu/d/sculptures/index.xml
    before we included the audio files, we added the images in iTunes.
    Select the file, then go to File>Get Info, here you can add metadata, and in Artwork add an image.
    Then upload this file to your server. Works for audio files anyways.
    You don't see the image in the web podcast, but you do in iTunes after you download each item, in "Show item artwork" in lower left. Click on the image and it zooms out.

  • Enable single item recovery with two retention settings at the database level.

    Hello All,
    We have an Exchange 2010 SP3 RU4 environment and planning on moving from third party archives solution to Native Exchange archives for cost reduction purposes, upgrading to Exchange 2013 to benefit from added in place features is not within scope at
    this stage.
    We are looking at implementing the following steps and want to know if it will work:
    1-Create archive DB(s) as per our usage and growth projections
    2-Enable archives for all our users and migrate current archive content to it.
    3-Create Retention Tag/Policy to move all records from live to archive "Age limit for retention" 90 days (no retention tags on the policy)
    4-Enable Single Item recovery for all of our users (script the same to run twice daily to enable SIR for newly created accounts)
    5-Set the "Keep Deleted Items" on the Live DB(s) to 90 days and the Archive DB(s) to 7 Years
    6-We are NOT using Legal Hold or plan to use it except on per as need basis
    Are we accomplishing the following:
    1-Items are automatically archived after 90 days
    2-Items archived now have a 7year retention based on the "keep deleted items" set for the archive DB(s)
    3-Items copied back to the live mailbox by a user will be returned to the archive database the next time the folder assistant runs against this user account (based on load or if run manually)
    4-Hard deleted items by a user is recoverable as long as the email record is within the retention period set at the database where it resides.
    5-Hard deleted items are recoverable using MFCMapi or by a restore.
    6-Items are permanently purged on the archive DB(s) after 7 years.
    Any input, ideas, recommendations, clarifications would be greatly valued and appreciated.  
    Ash

    Thanks CodexCZ,
    So, SIR will "kind of" do the same as the retention tag except I can use different durations based on the limits on each DB? am I correct?
    thanks again.
    Ash

  • Delete single item form multiple populated list

    Hi,
    please help me to find a solution!!
    I have 2 listboxes. listbox Description is populated by XML.
    When user selects multiple items at the same time from the Description listbox, they are populated in the listbox and are removed from Description listbox. that works fine.
    But the issue is if the user accidently selects one of the multiple selected items at the same time wrong and want to delete a single items, this doesnt work anymore.
    I can not even click on each single item.
    I try to find a way how to enable user to populate multiple items at the same time and be able to delete each single item, which then should return back to the Description listbox.
    I would really appreciate if you could help me on this!!!
    This is my sample: https://acrobat.com/#d=l0mujTOFduSJFele5R5i3g
    Thanks,
    Diana

    Would you not just reverse your code ..instead of populating listbox from the selections in description and deleting the items out of description, remove the items from listbox and update description then remove the items from listbox.
    Or am I missing something?
    Paul

  • Edit single item in Recurrence event through CSOM/javascript + SPService Library

    Hi,
      I've a requirement that I've custom action ribbon button. In a calendar list, there is a Person/Group field named "Attendees". I want to add current user to this field when the user click the ribbon button. I've implemented but the problem
    is I cant update the single item of recurrence event. Becuase recurrent event ID are different and not able to get the item. Using the below link, I got all the recurrence items, but i want to update the field of specific single item in recurrence item.
    https://www.nothingbutsharepoint.com/sites/eusp/Pages/Use-SPServices-to-Get-Recurring-Events-as-Distinct-Items.aspx
    Is it possible to edit the single item of recurrence event. If yes, please let me know. And one more, I don't want to implement this approach with workflow. Other than workflow, I want to implement this functionality. Please suggest. 
    Balaji -Please click mark as answer if my reply solves your problem.

    Hi  ,
    According to your description, my understanding is that you want to edit the single item of recurrence event using javascript.
    For your issue, you can refer to the steps as below:
    1. Create a list ribbon.
    2.When ribbon is clicked, get the selected event.
    3.If  the selected event is recurrence event, go to 4.If not, go to 6.
    4.If the selected event is modified recurrence event, update its "Attendees" column. If not, go to 5.
    5.Create a new event,set its MasterSeriesItemID to the ID of the selected recurrence event,set EventType to 3, set   its UID to the
    UID  of the selected recurrence event, set its  fRecurrence to 1, set RecurrenceID to the EventDate of the selected recurrence event and so on.
    6.Update its "Attendees" column.
    Reference:
    http://blogs.technet.com/b/sharepointdevelopersupport/archive/2013/03/25/how-to-programmatically-delete-a-single-instance-of-a-recurring-event-in-a-sharepoint-calendar.aspx
    http://social.technet.microsoft.com/Forums/office/en-US/f3b2ed46-d748-4aed-8b1c-765306ef3be0/how-update-fields-on-recursive-calendar-items?forum=sharepointdevelopmentlegacy
    http://stackoverflow.com/questions/2811756/update-item-has-recurrence-in-sharepoint
    http://aspnetguru.wordpress.com/2007/06/01/understanding-the-sharepoint-calendar-and-how-to-export-it-to-ical-format/
    http://sharepointtechie.blogspot.com/2010/08/deleting-individual-events-from.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • WC27 - Single Item, Single Level(?)

    Hello,
    I would just like to ask if there is a way in transaction WC27 (for MRP Batch Run) to only run Single Item, Single Level Materials during processing?
    I ask because I have a requirement (in addition to filtering material codes) to only run single item, single level entries for WC27 similar to MD03 but the customer wants the batch run feature.
    Hope to hear from you soon.
    Regards

    Hi,
          As it is correctly answered by the gurus above that it's difficult/not possible to run Batch structured MRP for only run Single Item, Single Level plannings..
    Hoiwever it can be mapped with the help of ABAPer to ask him/her to do some coding for standard report RMMRP000 .this is a standard ABAP report available within your SAP system (depending on your version and release level).  there is also some   standard documentation available for this report and a few details of other objects it interacts with such as tables, function modules, includes etc. If you would like to see the full code listing simply enter the object name( RMMRP000 ) into the relevant SAP transaction such as SE38 or SE80
    Within the comments section below there is also an opportunity for anyone to be able add useful hints and information specific to this SAP object. This means that you and other users will be able to find these details quickly by simply searching on the object name.
    Hope it could work for you.
    All the best!
    Regards
    Chandra

  • Automatic Single Item multi-level planning on sales order creation

    Hi all,
    I am using strategy 50 and want planning for single item to be carried out at the time of sales order creation to avoid MRP run everytime sales order is created..In order to achieve it i checked Automatic Planning Indicator in "OVZG" for the requirement class "045" which is requirement class for sales order of strategy 50. But still unable to achieve the desired result..
    Please guide me through.
    best regards,
    shah

    HI shah,
    in sales order go to Procurement tab there u will get the requirement type. system will determine requirement class based upon following criteria
    1) by strategy group in material master
    2) if strategy group not there then MRP group
    3) if mrp group not there then material type
    4) by this also not able to fine the requirement type then special rule is used with the help of item category and mrp type
    5) if this also fails then it will go with item category only
    6) this also fails then it will give any requirement type
    hope this is clear
    regards
    ramakant

  • Enabling Single Item Recovery per databse

    Hello,
    I am trying to find a command that will set "Single Item Recovery" to be true for all mailboxes in a database. I know how to set it for a single mailbox but I can't seem to find the correct syntax to make it work for each mailbox in a particuliar database.
    This is what I have come up with so far but it tries to set it on all mailboxes in all databases:
    [PS] C:\Get-Mailbox | Where{$_.Database -eq servername\databasename} | Set-Mailbox -SingleItemRecoveryEnabled $true
    Also, is there a way to set it as the default for all new mailboxes created in a database?
    TIA.
    Mark

    Addition to what Jonas said :)
    For a scheduled script you can use the same command as you already did: Get-Mailbox -Server
    servername| Set-Mailbox -SingleItemRecoveryEnabled $true. If you run that command once every night you would have to wait no more then one day before the new users have the correct settings.
    And if you want to make it a bit more complex you can add a where function and the command will only configure the mailboxes that has been created in the last 24h: Get-Mailbox -Server
    servername | Where { $_.WhenCreated -gt (get-date).adddays(-1) } | Set-Mailbox -SingleItemRecoveryEnabled $true
    Martin Sundström | Microsoft Certified Trainer | MCITP: Enterprise Messaging Administrator 2007/2010 |
    http://msundis.wordpress.com

  • Single item shipment using multiple trucks

    Hi Friends,
    I have a typical requirement where my client want to ship one of their product ( A Huge item, which they dismantle it for shipment) using multiple trucks. How we can handle this situation using SAP LES module? They can hire multiple trucks to ship this item by road to the destination using multiple service providers. So the service cost also need to be settled for all these service providers.  Will SAP allow to split a single item through multiple shipments? I really appreciate a solution for this.
    Thanks

    There are a couple of recommended methods for using more than one iPod on a single computer. Method one is to have individual Mac or Windows user accounts which by definition would give you completely separate libraries. Each account has it's own iTunes folder, Library and iTunes Music folder and you load it with CDs etc just as you did with your original one. Each iPod can be set to update however the owner chooses, sync all, manual or sync specific playlists.
    Method two is to set your preferences so that either one or all iPods get updated with only certain playlists within one library. Have a look at this article and see what you think and go for whichever you feel suits your needs best: How To Use Multiple iPods with One Computer
    Another option when using a single library is to set the iPods to manual update: Managing content manually on iPod
    Choosing the update option "automatically update selected playlists only" (called Sync Music - Selected playlists in iTunes 7) allows you to create a playlist specifically for each iPod and drag the tracks you want into it. If you tire of the list and want to change it, you just add or remove the songs you don't want. The ones you take out out remain in the library to be used by the other iPods. Make your playlist a Smart playlist and limit the size to just below the advertised capacity of your iPod ( for example, around 3700MB for a 4GB or 1800MB for a 2GB Mini or Nano). You can read more about playlists at these links:
    iTunes: Creating playlists of your favorite songs
    How to create a Smart Playlist with iTunes

Maybe you are looking for