Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Diogo 9 posts 40 karma points
    May 20, 2014 @ 13:31
    Diogo
    0

    Deleting item from xml

    Hey all,

    I need a way to remove 1 item or more if needed from my xml.This xml comes from the member property witch is sqlautocomplete(ucomponents). This is how i add new "row" to the xml

    XDocument xDocument = XDocument.Parse(member.getProperty(itemlist).Value.ToString());
    xDocument.Root.Add(new XElement(
                                                       "Item",
                                                      new XAttribute("Text", texts),
                                                     new XAttribute("Value", values)));
     member.getProperty(itemlist).Value = xDocument.ToString();

     

    Now how can i delete a row "Item" where the item attributte(Text) is equal to my variable texts or Item attribute(Value) is equal to my variable values?

    Thanks anyway for reading my post, and sorry for my bad english :)

Please Sign in or register to post replies

Write your reply to:

Draft