RSS Forums RSS
Please support our C# advertiser: Programming Forums
Views: 2560 | Replies: 1
Reply
Join Date: Dec 2004
Posts: 25
Reputation: acezrwild817 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
acezrwild817 acezrwild817 is offline Offline
Light Poster

Inserting Elements into existing XML

  #1  
Apr 14th, 2006
I have an XML database and I want to insert an element into each entry in the database. Currently it looks like this:


<?xml version="1.0" standalone="yes" ?>
- <SAFDB>
- <entry>
<name>2Mosaic_0_2_2.zip</name>
<application>2Mosaic</application>
<version>0.2.2</version>
<crc32>0B59ABC4</crc32>
<md5>EBD2356D2F5AC8A929B8118D60E4C932</md5>
<sha1>45E78DC66E2E5A42E8FB118430A1C8D16092DBF3</sha1>
<sha256>DDD4BB2AECC1743B0141BD307AC8CFF96E7D333334D16E914DF63B38355AE905</sha256>
</entry>
- <entry>
<name>2Mosaic.exe</name>
<application>2Mosaic</application>
<version>0.2.2</version>
<crc32>C5C58201</crc32>
<md5>5FAFBACE2114026CE44EAD88AA6760DD</md5>
<sha1>D2A606D05ABF1FE128473FDA8837DE309BAE227E</sha1>
<sha256>95D5301607C4B13D92C30C343B36A4EC57810C27AA96A3C5B561622D575ABED8</sha256>
</entry>
- <entry>
<name>ReadMe.txt</name>
<application>2Mosaic</application>
<version>0.2.2</version>
<crc32>3DD06166</crc32>
<md5>2175EC982C9BD3D7CBA21CB4F56ECE2D</md5>
<sha1>0277E714879EDF11BB97DF4A7A746BC4C79D75BA</sha1>
<sha256>29FA9736C8A969CA7945E29EB55AC3CC74A4D631921FAE1ACFC414C8FD1C4916</sha256>
</entry>

etc....

After the sha1 i want to enter a field for the size and i want to do this for every entry. There are thousands of these entries in the database. How do you do this?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Posts: 555
Reputation: Dark_Omen is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 5
Dark_Omen Dark_Omen is offline Offline
Posting Pro

Re: Inserting Elements into existing XML

  #2  
Apr 14th, 2006
i think this post might have. I had the same question alittle while ago.
http://www.daniweb.com/techtalkforum...735#post117735
Once you figure out how to add the elements, you can probably come up with an algorithm that can do what you want.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:17 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC