shawnmstout
asked on
C#.net XML change/add/remove certain xml
I am having a heck of a time understanding how to manipulate xml entries.
basically what i have created is a test directory of xml files
these are for media center movies and im trying to create a genre consolidation program where i can either remove or change the xml information for the genres
i have attached my file structure and my code to this project
under btnRun_Click
you will see the loop that is completing searching for the genre matches
under cbAction.Text == "Change" and cbAction.Text == "delete"
for change
1 is for changing the information which i was thinking would be best done by removing the old genres first and then adding in the new genres
also i need to check to make sure the same genre isnt listed multiple times if it is to only leave 1 instance of it
for delete
this should only delete out the matches in the list
i have attached the whole project but since experts-exchange eliminates some file extentions here is a list of the ones that will need renamed once downloaded
GenreFixer_2/GenreFixer/Ge nreFixer.c sproj.user .txt
change to
GenreFixer_2/GenreFixer/Ge nreFixer.c sproj.user
GenreFixer_2/GenreFixer/ob j/x86/Debu g/DesignTi meResolveA ssemblyRef erences.ca che.txt
change to
GenreFixer_2/GenreFixer/ob j/x86/Debu g/DesignTi meResolveA ssemblyRef erences.ca che
GenreFixer_2/GenreFixer/ob j/x86/Debu g
DesignTimeResolveAssemblyR eferencesI nput.cache .txt
change to
GenreFixer_2/GenreFixer/ob j/x86/Debu g
DesignTimeResolveAssemblyR eferencesI nput.cache
GenreFixer_2/GenreFixer/ob j/x86/Debu g/Generate Resource.r ead.1.tlog .txt
change to
GenreFixer_2/GenreFixer/ob j/x86/Debu g/Generate Resource.r ead.1.tlog
GenreFixer_2/GenreFixer/ob j/x86/Debu g/Generate Resource.w rite.1.tlo g.txt
change to
GenreFixer_2/GenreFixer/ob j/x86/Debu g/Generate Resource.w rite.1.tlo g
GenreFixer_2/GenreFixer/ob j/x86/Debu g/GenreFix er.frmGenr eFixer.res ources.txt
change to
GenreFixer_2/GenreFixer/ob j/x86/Debu g/GenreFix er.frmGenr eFixer.res ources
GenreFixer_2/GenreFixer/ob j/x86/Debu g/GenreFix er.Propert ies.Resour ces.resour ces.txt
change to
GenreFixer_2/GenreFixer/ob j/x86/Debu g/GenreFix er.Propert ies.Resour ces.resour ces
GenreFixer_2/GenreFixer/Pr operties/S ettings.se ttings.txt
change to
GenreFixer_2/GenreFixer/Pr operties/S ettings.se ttings
GenreFixer_2/GenreFixer.su o.txt
change to
GenreFixer_2/GenreFixer.su o
project is in vs2010
GenreFixer.exe test.zip GenreFixer-2.zip
basically what i have created is a test directory of xml files
these are for media center movies and im trying to create a genre consolidation program where i can either remove or change the xml information for the genres
i have attached my file structure and my code to this project
under btnRun_Click
you will see the loop that is completing searching for the genre matches
under cbAction.Text == "Change" and cbAction.Text == "delete"
for change
1 is for changing the information which i was thinking would be best done by removing the old genres first and then adding in the new genres
also i need to check to make sure the same genre isnt listed multiple times if it is to only leave 1 instance of it
for delete
this should only delete out the matches in the list
i have attached the whole project but since experts-exchange eliminates some file extentions here is a list of the ones that will need renamed once downloaded
GenreFixer_2/GenreFixer/Ge
change to
GenreFixer_2/GenreFixer/Ge
GenreFixer_2/GenreFixer/ob
change to
GenreFixer_2/GenreFixer/ob
GenreFixer_2/GenreFixer/ob
DesignTimeResolveAssemblyR
change to
GenreFixer_2/GenreFixer/ob
DesignTimeResolveAssemblyR
GenreFixer_2/GenreFixer/ob
change to
GenreFixer_2/GenreFixer/ob
GenreFixer_2/GenreFixer/ob
change to
GenreFixer_2/GenreFixer/ob
GenreFixer_2/GenreFixer/ob
change to
GenreFixer_2/GenreFixer/ob
GenreFixer_2/GenreFixer/ob
change to
GenreFixer_2/GenreFixer/ob
GenreFixer_2/GenreFixer/Pr
change to
GenreFixer_2/GenreFixer/Pr
GenreFixer_2/GenreFixer.su
change to
GenreFixer_2/GenreFixer.su
project is in vs2010
GenreFixer.exe test.zip GenreFixer-2.zip
ASKER
thats in test.zip file which is attached, i take it you havent looked
Don't you think this is too much work for both you and me? I mean, you took all the pain to rename each and every file and now I'll have to fish out this class that has the button click event that you're talking about. That's the reason why I suggested you to simplify your question. Post the xml, post your logic and tell what it is that you're trying to do and how far you've gone with it.
Please don't get me wrong. I'm very much willing to help you, but all I'm asking you is to ask a specific question that you have.
Arun
Please don't get me wrong. I'm very much willing to help you, but all I'm asking you is to ask a specific question that you have.
Arun
ASKER
its only 10 files to rename, its not like i didnt supply you with everything, but if its too much i understand, i can wait for someone else to help, i appreciate your time
ASKER
figured out where im getting stuck at, its at the nodes
here is an example
<Title>
<Genres>
<Genre>Whatever</Genre>
</Genres>
</Title>
im trying to add and remove from the <Genre> tag
here is an example
<Title>
<Genres>
<Genre>Whatever</Genre>
</Genres>
</Title>
im trying to add and remove from the <Genre> tag
ASKER
nevermind i figured it out on my own
ASKER
please close this out
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad you were able to resolve this.
Arun
Arun
Arun