|
-
Jul 30th, 2004, 04:03 PM
#1
Thread Starter
Fanatic Member
XML parser in vb.net
I hope I'm asking the right question, in the right place.
I have some an xml file generated that will eventually be passed in a word document, but till it gets there I have some values I need to pass into the xml file.
For instance, everytime the word %@ProspectName% is seen in xml I Need it to go into a sql database and find the value for that and replace it in the xml document. I hope this makes sense, and I hope I'm not shooting in the dark here.
Thanks!!
-
Aug 2nd, 2004, 11:49 AM
#2
Thread Starter
Fanatic Member
UPDATE XML parser in vb.net
Great! I figured out though...
how to load the xml document, and I can change Items in the xml as long as i know the index of the item. Using this...
Code:
Private Sub xmlChange()
Dim DS As New DataSet()
DS.ReadXml("c:\inetpub\wwwroot\xmlTest\xmlemp.xml")
DS.Tables(0).Rows(1).Item("Name") = "VALUE TO REPLACE WITH"
DS.WriteXml("c:\inetpub\wwwroot\xmlTest\xmlemp.xml")
End Sub
Now how can I have it search that Dataset for a particular string, and then change the value of that string? For example:
In my xml, i will have keywords such as %@Prospects% and %@Name% that I want to replace with values, but now can I tell the vb to search for those values instead of me having to know where they are beforehand?
Thanks!
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
|