C# load xml data with attributes to datagridview; update data and save back to the xml

Hi guys,
i currently have this XML as data
<DEALS>
<DEAL ID="22" ISBN="0-7888-1623-3" Screenplay="Mary Kaplan" Title ="Mr Gentleman" Director = "Jonathan Jones">
<ALLOCATION DEMANDE="5000" CODE="72" PRICE="25.00">2500</ALLOCATION>
<ALLOCATION DEMANDE="7000" CODE="75" PRICE="35.00">4000</ALLOCATION>
</DEAL>
<DEAL ID="23" ISBN="1-7988-1623-3" Screenplay="Joe Doe" Title ="Nothing Much" Director = "Listentome">
<ALLOCATION DEMANDE="3300" CODE="72" PRICE="15.00">2500</ALLOCATION>
</DEAL>
</DEALS>
I load the data with the code below:
i use xDocument to load the DealData.xml and then put it in ToString.
//outside of the form
public static class XElementExtensions
public static DataTable ToDataTable(this XElement element)
DataSet ds = new DataSet();
string rawXml = element.ToString();
ds.ReadXml(new StringReader(rawXml));
return ds.Tables[0];
public static DataTable ToDataTable(this IEnumerable<XElement> elements)
return ToDataTable(new XElement("Root", elements));
//in the form
private void button2_Click(object sender, EventArgs e)
var xDocument = XDocument.Load("DealData.xml");
string txtxml = xDocument.ToString();
StringReader reader = new StringReader(txtxml);
XDocument doc1 = XDocument.Load(reader);
var res = doc1.Descendants("DEAL").ToList().Where(x => x.Attribute("ID").Value == "22").Descendants("ALLOCATION");
dataGridView1.DataSource = res.ToDataTable();
Now my question is:
I would like to update the data from the DataGridview with the Attribute("ID").Value == "22" and save the data back to the XML.
For example, after I load my data on the datagridview, we only pickup anything that is in the node
<DEAL ID="22" ISBN="0-7888-1623-3" Screenplay="Mary Kaplan" Title ="Mr Gentleman" Director = "Jonathan Jones">
<ALLOCATION DEMANDE="5000" CODE="72" PRICE="25.00">2500</ALLOCATION>
<ALLOCATION DEMANDE="7000" CODE="75" PRICE="35.00">4000</ALLOCATION>
</DEAL>
I updated the datagridview below with DEMANDE = 9000 CODE = 66 PRICE = 24.77 AND ALLOCATION = 1200
I want be able to extract the data back in the xml as a child of the DEAL ID = "22"
So that the XML file looks like this 
<DEALS>
<DEAL ID="22" ISBN="0-7888-1623-3" Screenplay="Mary Kaplan" Title ="Mr Gentleman" Director = "Jonathan Jones">
<ALLOCATION DEMANDE="5000" CODE="72" PRICE="25.00">2500</ALLOCATION>
<ALLOCATION DEMANDE="7000" CODE="75" PRICE="35.00">4000</ALLOCATION>
<ALLOCATION DEMANDE="9000" CODE="66" PRICE="24.77">1200</ALLOCATION> <-! this is the new line !->
</DEAL>
<DEAL ID="23" ISBN="1-7988-1623-3" Screenplay="Joe Doe" Title ="Nothing Much" Director = "Listentome">
<ALLOCATION DEMANDE="3300" CODE="72" PRICE="15.00">2500</ALLOCATION>
</DEAL>
</DEALS>
Is there a way to achieve that?
I have been searching and reading in the books but i cannot find a solution for this.
Thank you
Please do not forget to click “Vote as Helpful” if the reply helps/directs you toward your solution and or "Mark as Answer" if it solves your question. This will help to contribute to the forum.

I would think of something like the below, the id is passed as static you need to change this
protected virtual void button1_Click(object sender, EventArgs e)
//Get DataTable from DGV datasource
DataTable dt = new DataTable();
dt = (DataTable)dataGridView1.DataSource;
string file1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><DEALS><DEAL ID=\"22\" ISBN=\"0-7888-1623-3\" Screenplay=\"Mary Kaplan\" Title =\"Mr Gentleman\" Director = \"Jonathan Jones\"><ALLOCATION DEMANDE=\"5000\" CODE=\"72\" PRICE=\"25.00\">2500</ALLOCATION><ALLOCATION DEMANDE=\"7000\" CODE=\"75\" PRICE=\"35.00\">4000</ALLOCATION></DEAL><DEAL ID=\"23\" ISBN=\"1-7988-1623-3\" Screenplay=\"Joe Doe\" Title =\"Nothing Much\" Director = \"Listentome\"><ALLOCATION DEMANDE=\"3300\" CODE=\"72\" PRICE=\"15.00\">2500</ALLOCATION></DEAL></DEALS>";
StringReader reader = new StringReader(file1);
XDocument doc1 = XDocument.Load(reader);
//Remove all elements related to the id being populated into the Grid
doc1.Descendants("DEAL").ToList().Where(x => x.Attribute("ID").Value == "22").Descendants("ALLOCATION").Remove();
//loop through datatable and create new xelement to be added to the xdocument
foreach (DataRow dr in dt.Rows)
XElement xe = new XElement("ALLOCATION",
new XAttribute("DEMANDE", dr[0].ToString()),
new XAttribute("CODE", dr[1].ToString()),
new XAttribute("PRICE", dr[2].ToString()));
xe.Value = dr[3].ToString();
doc1.Descendants("DEAL").ToList().Where(x => x.Attribute("ID").Value == "22").FirstOrDefault().Add(xe);
Fouad Roumieh

Similar Messages

  • HT2473 How can I get the date and time back on the menu bar?

    Several items disappeared from my menu bar for no  reason known to me.  I miss the date and time and want it back. Please .  I have gone to System Preferences and clicked "date and Time" but it will not allow me to check anything on the page even though there is a box "Show date and time in Menu bar".
    What should be my next move?

    One more thing might help us
    In the Finder > Date & Time Preferences > Take a Full ScreenShot of the entire display showing the "absence" of the check box (or whatever) to Show in Menu Bar
    ⌘ Command + ⇧ Shift > Press ' 3 ' > release all three
    Use the camera tool > locate the screenshot in the Desktop (not sure whether it will say "Picture 1.png" or have a TimeDateStamp as a title.
    ÇÇÇ

  • How do you fix the year date and time back to the present?

    Help me it not letting me go to 2012 it is on2512BE and it will not let me change the time back

    Go to Settings>General>International and make sure the calendar is set to Gregorian. Then go to Settings>General>Time&Date and set to the correct times. Set to Automatic if you have iOS 5.

  • What happens internally while loading master data and transaction?

    hello,
    What happens internally and which tables are used while loading master data and transaction?
    I have loaded the data in DSO, but i am not getting value of particular InfoObject after loading the data.
    I have executed Attribute change run also.
    Kindly explain ...
    Thanks,
    Sonu

    Hi,
    Master data,
    Material Indipendent data can be sent without any dependency.
    Material Dependent data sequence is as follow.
    Plant,
    MRP areas,
    Supply area,
    Material,
    MRP area material,
    planning material,
    ATP check,
    Purchase info recards,
    schedule agg,
    PPM or PDS (But before PPM or PDS  work center should send to apo) If PDS is sending then BOM should send before PDS.
    Transaction data.
    As per the business requirement what is planning in apo.
    Regards,
    Kishore Reddy.

  • How to read csv Data and save it with no format changes

    Hi,
    At first I am not used to Diadem.
    I want to read in a csv file do some calculation with the data and save the changed data in the same csv file. A file as an example is attached (496888_edit.csv).
    Therefore I wrote this lines:
    Dim i
    Dim Delimiter
    Dim FilePath
    Dim FileParameters
    Delimiter = ";"
    Call DataFileLoad(FilePath,"CSV","Load")
    ' Do some calculations
    FileParameters = "<filename>"&FilePath&"</filename>"&"<delimiter>"&​Delimiter&"</delimiter>"
    Call DataFileSave(FileParameters,"CSV")
    After running that lines the csv file is looking like the other attached file (496888_after.csv)
    Because of some reasons which I could not explain Diadem is rounding the numbers. I want that both files look the same.
    What can I do?
    There might be another extension. Just to read in some columns, doing some calculations and after the calculation saving that columns in the file instead of the originals. (The csv files are much bigger like the two examples)
    Thanks,
    Jens 
    Attachments:
    496888_edit.csv ‏1 KB
    496888_after.csv ‏1 KB

    The only thing that can be changed in writing float64 values using the CSV plugin is the decimal point ('.' or ',').
    The format of the doubles is not rounded but the CSV writer only writes the relevant digits.
    It is using up to 15 digits which is the resolution of float 64. It would also switch to scintific writing if necessary.
    So there is no way to force only 6 digits and filling 0s are left out. So if you just fear that you loose precision that will not happen.
    (only the typical problems of epressing a 2 system binary value in a 10 system text string)
    If you are interested to have a fix float format the only solution is to write with VBS directly to a file doing formatting on your own, which is slow.

  • How to load master data and hierarchies from R/3 systems

    HI all,
    how to load master data and hierarchies from R/3 systems.
    Please explain the steps.
    Thanks,
    cheta.

    HI,
    Its normally done following: Transferring the master datasources in RSA5 to RSA6 and then replicating the DS into BW and assignment of DS to Infosource and cretaion of Infopackage and load it into the master tables.
    Generally, the control parameters for data transfer from a source system are maintained in extractor
    customizing. In extractor customizing, you can access the corresponding source system in the source
    system tree of the SAP BW Administrator Workbench by using the context menu.
    To display or change the settings for data transfer at source system level, choose Business
    Information Warehouse &#8594; General Settings &#8594; Maintaining Control Parameters for Data Transfer.
    Note: The values for the data transfer are not hard limitations. It depends on the DataSource if these
    limits can be followed.
    In the SAP BW Scheduler, you can determine the control parameters for data transfer for individual
    DataSources. You can determine the size of the data packet, the number of parallel processes for
    data transfer and the frequency with which the status IDocs are sent, for every possible update
    method for a DataSource.
    To do so, choose Scheduler &#8594; DataSource &#8594; Default Settings for Data transfer.
    In this way you can, for example, update transaction data in larger data packets in the PSA. If you
    want to update master data in dialog mode, smaller packets ensure faster processing.
    Hope this info helps.
    Thanks,Ramoji.

  • While loading transaction data into cube what are the tables generats

    Hi,
    while loading transaction data into cube what are the tables normally generats.

    Hi,
    Normally datas will be loading to 'F'- Fact tables (/BIC/F****) *** - cube name..
    When you do compress the request the data will be moved into E tables.
    Regards,
    Siva.

  • I have iphone 4s and i did by mistake a restore with different id so i lost all my data and i got all the other id data , contacts .....etc , please how can i fix that mistake

    I have iphone 4s and i did by mistake a restore with different id so i lost all my data and i got all the other id data , contacts .....etc , please how can i fix that mistake

    How to Restore from a backup: http://support.apple.com/kb/ht1766

  • HT1199 Hai, i tried to open itunes on my windows 8 laptop but it comes out with 'iTunes has stop working' notification and need to close the program everytime i try to load it. Please help! thanks.

    Hai, i tried to open itunes on my windows 8 laptop but it comes out with 'iTunes has stop working' notification and need to close the program everytime i try to load it. Please help! thanks.

    Hi ajay-9,
    Thanks for visiting Apple Support Communities.
    The steps in this article can help if iTunes is quitting unexpectedly on your PC:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Cheers,
    Jeremy

  • SG-300 28P switches problem with VLAN Data and Voice, working all the time as Voice VLAN

    Hi Everyone,
    Thank you very much for your help in advance. I’m pulling my hair to fix the problem.
    I  just got the new SG-300 28P switches. My Bios ordered for me. I did not  know how it runs until now... not an IOS based. I really do not know  how to configure it.
    I have 2 VLAN are Data and Voice.
    -          Data VLAN ID is 2 IP 192.168.2.X/255.255.255.0
    -          Voice VLAN ID is 200 IP 192.168.22.X/255.255.255.0
    -          I created two vlans, in switch, Data and Voice.
    -          On the port number 28, it is trunk by default, so I add Data vlan ID 2 tagged.
    -          On the port number 26, it is trunk by default, so I add Voice vlan ID 200 tagged.
    -          On the port number 27, I add Data vlan ID 2 tagged for Data vlan out.
    -          Port settings No.1
    I set it up as Trunk with Data vlan 2 untagged, and  200  Tagged (voice vlan). I plugged in a phone with a pc attached. But the  PC will get to the vlan 200 to get the DHCP address, but no from vlan 2.  The Phone works with correct vlan ip.
    -          Port settings No.2
    Trunk with vlan 1UP, 2T, and 200T. The phone is even worse. Would never pick up any IP from DHCP.
    -          Port settings No.3
    Access  with 200U...of course the phone will work... and the PC could not get  to its own vlan. Instead, the PC got an ip from the voice vlan. Not from  VLAN 2.
    I have Linksys phone I’m not sure if this help.
    For more information I setup in switch,
                - enable voice vlan
    - set the port on auto voice vlan
    - enable LLDP-MED globally
    - create a network policy to assign VLAN 200
    - assign this network policy to the port the phone is connected to.
    I  hope this information help to help me to setup Data and Voice vlans, to  plug the phone to work with vlan Voice 200 (IP rang 192.168.22.X), from  phone to Pc and pc work as Data vlan 2 (IP rang 192.168.2.X).

    I just got done setting up voice VLANs on an SF 300-24P and verified working.  This was working with Cisco 7900 series phones connected to a Cisco UC setup.
    Here's my sample config.
    Note that I edited this by hand before posting, so doing a flat out tftp restore probably won't work.  However, this should give you a clue.  Also, don't take this as 100% accurate or correct.  I've only been working with these things for about a week, though I've worked with the older Linksys SRW switches for a couple of years.  I'm a CCNP/CCDP.
    VLAN 199 is my management VLAN and is the native VLAN on 802.1q trunks.
    VLAN 149 is the data/computer VLAN here.
    VLAN 111 is the voice/phone VLAN here.
    VLAN 107 does nothing.
    interface range ethernet e(1-24)
    port storm-control broadcast enable
    exit
    interface ethernet e1
    port storm-control include-multicast
    exit
    interface ethernet e2
    port storm-control include-multicast
    exit
    interface ethernet e3
    port storm-control include-multicast
    exit
    interface ethernet e4
    port storm-control include-multicast
    exit
    interface ethernet e5
    port storm-control include-multicast
    exit
    interface ethernet e6
    port storm-control include-multicast
    exit
    interface ethernet e7
    port storm-control include-multicast
    exit
    interface ethernet e8
    port storm-control include-multicast
    exit
    interface ethernet e9
    port storm-control include-multicast
    exit
    interface ethernet e10
    port storm-control include-multicast
    exit
    interface ethernet e11
    port storm-control include-multicast
    exit
    interface ethernet e12
    port storm-control include-multicast
    exit
    interface ethernet e13
    port storm-control include-multicast
    exit
    interface ethernet e14
    port storm-control include-multicast
    exit
    interface ethernet e15
    port storm-control include-multicast
    exit
    interface ethernet e16
    port storm-control include-multicast
    exit
    interface ethernet e17
    port storm-control include-multicast
    exit
    interface ethernet e18
    port storm-control include-multicast
    exit
    interface ethernet e19
    port storm-control include-multicast
    exit
    interface ethernet e20
    port storm-control include-multicast
    exit
    interface ethernet e21
    port storm-control include-multicast
    exit
    interface ethernet e22
    port storm-control include-multicast
    exit
    interface ethernet e23
    port storm-control include-multicast
    exit
    interface ethernet e24
    port storm-control include-multicast
    exit
    interface range ethernet g(1-4)
    description "Uplink trunk"
    exit
    interface range ethernet g(1-4)
    switchport default-vlan tagged
    exit
    interface range ethernet e(21-24)
    switchport mode access
    exit
    vlan database
    vlan 107,111,149,199
    exit
    interface range ethernet g(1-4)
    switchport trunk allowed vlan add 107
    exit
    interface range ethernet e(21-24)
    switchport access vlan 111
    exit
    interface range ethernet g(1-4)
    switchport trunk allowed vlan add 111
    exit
    interface range ethernet e(1-20)
    switchport trunk native vlan 149
    exit
    interface range ethernet g(1-4)
    switchport trunk allowed vlan add 149
    exit
    interface range ethernet g(1-4)
    switchport trunk native vlan 199
    exit
    voice vlan aging-timeout 5
    voice vlan oui-table add 0001e3 Siemens_AG_phone________
    voice vlan oui-table add 00036b Cisco_phone_____________
    voice vlan oui-table add 00096e Avaya___________________
    voice vlan oui-table add 000fe2 H3C_Aolynk______________
    voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
    voice vlan oui-table add 00d01e Pingtel_phone___________
    voice vlan oui-table add 00e075 Polycom/Veritel_phone___
    voice vlan oui-table add 00e0bb 3Com_phone______________
    voice vlan oui-table add 108ccf MyCiscoIPPhones1
    voice vlan oui-table add 40f4ec MyCiscoIPPhones2
    voice vlan oui-table add 8cb64f MyCiscoIPPhones3
    voice vlan id 111
    voice vlan cos 6 remark
    interface ethernet e1
    voice vlan enable
    exit
    interface ethernet e1
    voice vlan cos mode all
    exit
    interface ethernet e2
    voice vlan enable
    exit
    interface ethernet e2
    voice vlan cos mode all
    exit
    interface ethernet e3
    voice vlan enable
    exit
    interface ethernet e3
    voice vlan cos mode all
    exit
    interface ethernet e4
    voice vlan enable
    exit
    interface ethernet e4
    voice vlan cos mode all
    exit
    interface ethernet e5
    voice vlan enable
    exit
    interface ethernet e5
    voice vlan cos mode all
    exit
    interface ethernet e6
    voice vlan enable
    exit
    interface ethernet e6
    voice vlan cos mode all
    exit
    interface ethernet e7
    voice vlan enable
    exit
    interface ethernet e7
    voice vlan cos mode all
    exit
    interface ethernet e8
    voice vlan enable
    exit
    interface ethernet e8
    voice vlan cos mode all
    exit
    interface ethernet e9
    voice vlan enable
    exit
    interface ethernet e9
    voice vlan cos mode all
    exit
    interface ethernet e10
    voice vlan enable
    exit
    interface ethernet e10
    voice vlan cos mode all
    exit
    interface ethernet e11
    voice vlan enable
    exit
    interface ethernet e11
    voice vlan cos mode all
    exit
    interface ethernet e12
    voice vlan enable
    exit
    interface ethernet e12
    voice vlan cos mode all
    exit
    interface ethernet e13
    voice vlan enable
    exit
    interface ethernet e13
    voice vlan cos mode all
    exit
    interface ethernet e14
    voice vlan enable
    exit
    interface ethernet e14
    voice vlan cos mode all
    exit
    interface ethernet e15
    voice vlan enable
    exit
    interface ethernet e15
    voice vlan cos mode all
    exit
    interface ethernet e16
    voice vlan enable
    exit
    interface ethernet e16
    voice vlan cos mode all
    exit
    interface ethernet e17
    voice vlan enable
    exit
    interface ethernet e17
    voice vlan cos mode all
    exit
    interface ethernet e18
    voice vlan enable
    exit
    interface ethernet e18
    voice vlan cos mode all
    exit
    interface ethernet e19
    voice vlan enable
    exit
    interface ethernet e19
    voice vlan cos mode all
    exit
    interface ethernet e20
    voice vlan enable
    exit
    interface ethernet e20
    voice vlan cos mode all
    exit
    interface ethernet e1
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e2
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e3
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e4
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e5
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e6
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e7
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e8
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e9
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e10
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e11
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e12
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e13
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e14
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e15
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e16
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e17
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e18
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e19
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e20
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e21
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e22
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e23
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e24
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet g1
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet g2
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet g3
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet g4
    lldp optional-tlv port-desc sys-name sys-desc sys-cap 802.3-mac-phy 802.3-lag 802.3-max-frame-size
    exit
    interface ethernet e1
    lldp med notifications topology-change enable
    exit
    interface ethernet e2
    lldp med notifications topology-change enable
    exit
    interface ethernet e3
    lldp med notifications topology-change enable
    exit
    interface ethernet e4
    lldp med notifications topology-change enable
    exit
    interface ethernet e5
    lldp med notifications topology-change enable
    exit
    interface ethernet e6
    lldp med notifications topology-change enable
    exit
    interface ethernet e7
    lldp med notifications topology-change enable
    exit
    interface ethernet e8
    lldp med notifications topology-change enable
    exit
    interface ethernet e9
    lldp med notifications topology-change enable
    exit
    interface ethernet e10
    lldp med notifications topology-change enable
    exit
    interface ethernet e11
    lldp med notifications topology-change enable
    exit
    interface ethernet e12
    lldp med notifications topology-change enable
    exit
    interface ethernet e13
    lldp med notifications topology-change enable
    exit
    interface ethernet e14
    lldp med notifications topology-change enable
    exit
    interface ethernet e15
    lldp med notifications topology-change enable
    exit
    interface ethernet e16
    lldp med notifications topology-change enable
    exit
    interface ethernet e17
    lldp med notifications topology-change enable
    exit
    interface ethernet e18
    lldp med notifications topology-change enable
    exit
    interface ethernet e19
    lldp med notifications topology-change enable
    exit
    interface ethernet e20
    lldp med notifications topology-change enable
    exit
    interface ethernet e21
    lldp med notifications topology-change enable
    exit
    interface ethernet e22
    lldp med notifications topology-change enable
    exit
    interface ethernet e1
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e2
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e3
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e4
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e5
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e6
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e7
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e8
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e9
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e10
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e11
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e12
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e13
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e14
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e15
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e16
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e17
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e18
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e19
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e20
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e21
    lldp med enable network-policy poe-pse
    exit
    interface ethernet e22
    lldp med enable network-policy poe-pse
    exit
    lldp med network-policy 1 voice vlan 111 vlan-type tagged
    interface range ethernet e(1-22)
    lldp med network-policy add 1
    exit
    interface vlan 199
    ip address 199.16.30.77 255.255.255.0
    exit
    ip default-gateway 199.16.30.3
    interface vlan 1
    no ip address dhcp
    exit
    no bonjour enable
    bonjour service enable csco-sb
    bonjour service enable http  
    bonjour service enable https 
    bonjour service enable ssh   
    bonjour service enable telnet
    hostname psw1
    line console
    exec-timeout 30
    exit
    line ssh
    exec-timeout 30
    exit
    line telnet
    exec-timeout 30
    exit
    management access-list Management1
    permit ip-source 10.22.5.5 mask 255.255.255.0
    exit
    logging 199.16.31.33 severity debugging description mysysloghost
    aaa authentication enable Console local
    aaa authentication enable SSH tacacs local
    aaa authentication enable Telnet local
    ip http authentication tacacs local
    ip https authentication tacacs local
    aaa authentication login Console local
    aaa authentication login SSH tacacs local
    aaa authentication login Telnet local
    line telnet
    login authentication Telnet
    enable authentication Telnet
    password admin
    exit
    line ssh
    login authentication SSH
    enable authentication SSH
    password admin
    exit
    line console
    login authentication Console
    enable authentication Console
    password admin
    exit
    username admin password admin level 15
    power inline usage-threshold 90
    power inline traps enable
    ip ssh server
    snmp-server location in-the-closet
    snmp-server contact [email protected]
    ip http exec-timeout 30
    ip https server
    ip https exec-timeout 30
    tacacs-server host 1.2.3.4 key spaceballz  timeout 3  priority 10
    clock timezone -7
    clock source sntp
    sntp unicast client enable
    sntp unicast client poll
    sntp server 199.16.30.1
    sntp server 199.16.30.2
    ip domain-name mydomain.com
    ip name-server  199.16.5.12 199.16.5.13
    ip telnet server

  • How to edit XML parsed data and save on iPhone app

    Hi,
    How to edit and XML retrieved data that is displayed on an iPhone app and save again in the same XML file using iPhone SDK.
    In other words I want to change the XML file data or edit and save.
    Thnx in advance.
    Regards
    Amit

    Hello amit,
    No, not at all. Surely you will parse your XML file using the NSXMLParser class. OK! i think i get it now, do you wants to change/modify the value of any tag in the XML file? For that you will be required to parse your XML file using NSXMLParser class, and fill out some data structure (according to the the XML format) do some changes into your data structure, and then write your XML to the file (according to the edited data structure) using the method i told u earlier. This is what my preferred method is, and i am pretty much sure that it is not a bad way to do this at all.
    Hope this clarifies some of your queries.
    Best regards,
    Obaid

  • My ibook keeps shutting down completely with the date to reverting back to 1969.  i restart only after i plug in charger it lets me, then change date and save.  the next time i use same thing happens, safari, iphoto, email are the only ones i have used.

    my ibook keeps shutting down completely with the date to reverting back to 1969.  i restart only after i plug in charger it lets me, then change date and save.  the next time i use same thing happens, safari, iphoto, email are the only ones i have used.
    please help!  i am at a loss here.
    thank you, movie lady
    ibook g4

    The iBook does not have a backup (PRAM) battery. It only has the main battery and a small capacitor which maintains the settings long enough to do a battery swap. If the battery is dead, what you are seeing can happen.
    If the battery is not a problem (or even if it is), you could try resetting the PMU and see if that helps.

  • I have my catalog "Back Up Each Time Lightroom Exits" checked, and always have. That means the catalog should have been backed-up and saved everyday, if not more than once on some dates. So with a a major problem now and needing to use the Catalog backup

    I have my catalog "Back Up Each Time Lightroom Exits" checked, and always have. That means the catalog should have been backed-up and saved everyday, if not more than once on some dates. So with a a major problem now and needing to use the Catalog backup from last Friday, I go to my Lightroom Backups folder - and the most recent one showing not only isn't yesterday, it's OCTOBER 28 !?? Where the hell are the daily backups between October 28 and November 14?

    Oh wow - JET LAG strikes agin - my apologies; I have located the missing weeks of back-ups. After getting home from a 30-day trip to Europe, I had changed the location of my LR catalog back-ups to an external drive, and forgot that I did that. I have found them, and all is good. Never operate Heavy Machinery without enough rest. Cheers

  • Why won't the date and time stay in the menu bar?

    I just installed 10.6.2 and even when I use System Preferences to check the box in the Date/Time panel they flicker and disappear from the menu bar. Why won't the Date and Time stay in the Menu Bar? Any suggestions? Thanks.
    Frank B

    Doesn't any bring up the fact that Apple has so many customers with problems that the refuse to help unless you pay them cash? They update you and screw you over and then offer no useful troubleshooting scenarioius to help their millions of customers. It is because they want millions of our dollars. I hate Apple.

  • TS1702 My Kindle app suddenly stopped working on my iPhone 4s. All my software is up to date and I have restarted the phone, uninstalled and reinstalled the app and it still opens and shuts down instantly. Any ideas?

    My Kindle app suddenly stopped working on my iPhone 4s. All my software is up to date and I have restarted the phone, uninstalled and reinstalled the app and it still opens and shuts down instantly. Any ideas?

    We need clarification here.
    Please don't just state version numbers, also state which software.  iTunes 10.7 requires OSX 10.6.8 or higher.  Leopard is OSX 10.5.8.  You have two alternatives right now.  One is to stay with Leopard for a while (ultimately you should upgrade) and install iTunes 10.6.3 which is the last version to work with Leopard.  This should work with iOS6 on an iPhone4.  The other is to call Apple and order OSX 10.6 (Snow Leopard) and upgrade the computer to 10.6.8 which will allow you to run iTunes 10.7.  The caveat is we know nothing about which computer you run and if it even can run any system higher than Leopard.
    Here is iTunes 10.6.3
    iTunes 10.6.3 - http://support.apple.com/kb/DL1575
    If you want to try upgrading:
    Get more information about your computer. Go to the Apple in the upper left corner of any window, then "About this Mac" and "More Info..."  Copy and paste the information here, but omit the serial number and Hardware UUID (if present).  If it says something about Intel or Core Duo or Core 2 Duo in the processor you can upgrade to Snow Leopard (assuming you have sufficient RAM/"memory").  If it says PPC or PowerMac, you cannot.
    Kappy 08/2012 post on upgrading to Snow Leopard, then Lion or Mountain Lion -  https://discussions.apple.com/message/19401628 - including how to get Snow Leopard and Lion since Apple removed them from the online store. 
    It would help when posting issues here if you would state exact error messages you see.  "It's still not working!" while a description of the situation does not speed us to a diagnosis of the underlying issue.

Maybe you are looking for