|
-
Feb 6th, 2007, 06:13 AM
#1
Thread Starter
Fanatic Member
Changing '&' to '+' in an xml file
Hi guys,
I was wondering how i would go about changing all occurences of the character '&' with a plus sign ('+') instead. This because i am downloading several xml files and storing the information at each node in a Database. Now because i am using .net compact framework 2 windows mobile 5 and am unable to use the .Usemneumonics property to allow an ampersand character to display. So i have decided to change every ampersand to a plus sign but because i dont know exactly where it could appear in the xml file i'd need to go through the whole file and change the character.
How can i got about doing this?
Thanks in advance for any help
If your problem has been solved then please mark the thread [RESOLVED].
If i have helped then please Rate my post 
-
Feb 6th, 2007, 11:21 AM
#2
Addicted Member
Re: Changing '&' to '+' in an xml file
Replace command
VB Code:
Dim strTest As String = "&&&&&&&"
MessageBox.Show(strTest.Replace("&", "+"))
)
-
Feb 6th, 2007, 11:45 AM
#3
Thread Starter
Fanatic Member
Re: Changing '&' to '+' in an xml file
Yeah i know that but is there anyway to do that before the xml file is inserted in the database?
So it kind of goes:
download xml file -> search xml file for '&' -> if exists replace with '+' -> insert into database.
Its just the 2nd and 3rd step i need to know.
Thanks.
If your problem has been solved then please mark the thread [RESOLVED].
If i have helped then please Rate my post 
-
Feb 6th, 2007, 01:25 PM
#4
Addicted Member
Re: Changing '&' to '+' in an xml file
After you download it, read it into a string, perform the replace and save it. Then import it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|