Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
SQL
Can any one tell me how to Add/edit/delete record in this xml file using asp.net with c#. i just want to edit only those line not whole record.

XML
<image imagePath="gihm/gihm1.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g1.jpg" colorTheme="0x66FF66" colorBackground="0x000000" colorDescription="0xFFFF00">
    </image>

SQL
i am only "Add"/edit/delete these record from xml file.
File Contain That Type of Data.


XML
<slideshow>
<settings
        slideshowWidth="590"
        slideshowHeight="300"
        imageTime="5"
        transitionTime = "1"
        easeType = "easeInOutSine"
        toShuffle = "true"
        enableNavigation = "true"
        enableDescriptions = "true"
        lockDescriptionOpen = "false"
        enablePlayPauseButton = "true"
        enableImageLink = "true"
        elementsTransitionTime = ".7"
        elementsEaseType = "easeOutCirc"
    >
    </settings>
    <image imagePath="gihm/gihm1.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g1.jpg" colorTheme="0x66FF66" colorBackground="0x000000" colorDescription="0xFFFF00">
    </image>
    <image imagePath="gihm/gihm2.jpg" imageName="GIHM Student" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g2.jpg" colorTheme="0x000000" colorBackground="0xCCCCCC" colorDescription="0x333333">
    </image>
    <image imagePath="gihm/gihm3.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g3.jpg" colorTheme="0x0033CC" colorBackground="0xFFFFFF" colorDescription="0x000000">
    </image>
    <image imagePath="gihm/gihm4.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g4.jpg" colorTheme="0xFF6600" colorBackground="0x000000" colorDescription="0xFFBC2D">
    </image>
    <image imagePath="gihm/gihm5.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g5.jpg" colorTheme="0x00CC00" colorBackground="0x000000" colorDescription="0xFFFFFF">
    </image>
    <image imagePath="gihm/gihm6.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g6.jpg" colorTheme="0xFF6600" colorBackground="0x000000" colorDescription="0xFFFFFF">
    </image>
    <image imagePath="gihm/gihm7.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g7.jpg" colorTheme="0x00CC33" colorBackground="0x000000" colorDescription="0x666666">
    </image>
    <image imagePath="gihm/gihm8.jpg" imageName="Looks sweet..." imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g8.jpg" colorTheme="0x5E4675" colorBackground="0xCCCCCC" colorDescription="0x333333">
    </image>
    <image imagePath="gihm/gihm9.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g9.jpg" colorTheme="0xCCCCCC" colorBackground="0x000000" colorDescription="0x999999"></image>
    <image imagePath="gihm/gihm10.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g10.jpg" colorTheme="0xFF6600" colorBackground="0x000000" colorDescription="0xFFFFFF">
    </image>
    <image imagePath="gihm/gihm11.jpg" imageName="GIHM" imageDescription="GIHM" url="default.aspx" thumbnailPath="gihm/thumb/g11.jpg" colorTheme="0xFFFFFF" colorBackground="0x6F9BB4" colorDescription="0x000000">
    </image>
</slideshow>
Posted
Comments
Tarun.K.S 11-Apr-11 10:15am    
Why did you post it again?
I have answered in your previous post.
Ram Kumar(Webunitech) 11-Apr-11 10:56am    
sorry i am forget to write the Add also in xml file.
Please sir tell me
i am totally new on xml.
plz help me it's urgent

1 solution

Take a look at XElement[^] class in C#. It has some really good functions, that can help you.
 
Share this answer
 
Comments
Ram Kumar(Webunitech) 11-Apr-11 10:31am    
sir Please Tell how to Add Record
Give me xml command
because i am new in xml
Tarun.K.S 11-Apr-11 10:36am    
Check my answer here : http://www.codeproject.com/Questions/180043/how-to-edit-delete-record-in-this-type-of-xml-in-a.aspx.

I have answered there.
Kim Togo 11-Apr-11 10:38am    
ram_kumar, take a loot at Tarun.K.S answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900