473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problems with Replace .. please help

Hi,

I have an xml file.

<cashier>
<tag param1="work-14" param1="0" param2="1000199" param3="1" param4="2141690" param5="3" param5="3" param6="011111" param7="4" />
<tag param1="work-14" param1="0" param2="1000199" param3="1" param4="2141690" param5="3" param5="3" param6="033333" param7="4" />
<tag param1="work-16" param1="0" param2="1000199" param3="1" param4="2141690" param5="3" param5="3" param6="022222" param7="4" />
<tag param1="work-16" param1="0" param2="1000199" param3="1" param4="2141690" param5="3" param5="3" param6="044444" param7="4" />
</cashier>

And my VB.NET Code is as follows:

Dim oXmlDoc As XmlDocument = New XmlDocument()
oXmlDoc.Load("c:\cashier.xml")
Dim oNode As XmlElement = oXmlDoc.SelectSingleNode("cashier/tag[@param1='work-" & lbunique.Text & "']")
Dim node As XmlNode
Dim attrib As XmlAttribute = oNode.Attributes("param6")
For Each node In oNode
oNode.SetAttribute("param6", newparam6)
Next
oXmlDoc.Save("c:\cashier.xml")
And I would want to be able to replace all param6 to a new value, which has param1 set to work-14.

--
Thank You,
Sean
Nov 19 '05 #1
0 1418

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Gerson Kurz | last post by:
AAAAAAAARG I hate the way python handles unicode. Here is a nice problem for y'all to enjoy: say you have a variable thats unicode directory = u"c:\temp" Its unicode not because you want it...
2
by: Barnes | last post by:
Hi, Can anyone please tell me how I can use the replace method to replace a character if it occures in more than one textbox without having to write separate function for each textbox. The...
5
by: Shawn Modersohn | last post by:
For the script: <script language="JavaScript"> function pullPage(){ var arrayLength=document.teamSelectionF.teamSelectionS.length; var pageNav = new Array(arrayLength); var...
6
by: Rabel | last post by:
I have a shopping cart that I am having a few problems with. I am mostly a flash developer with basic if not little javascript knowledge, I need for my checkout to have a checkbox that if clicked...
0
by: Sean | last post by:
Hi, I have an xml file. <cashier> <tag param1="work-14" param1="0" param2="1000199" param3="1" param4="2141690" param5="3" param5="3" param6="011111" param7="4" /> <tag param1="work-14"...
13
by: bussiere bussiere | last post by:
hi i'am making a program for formatting string, or i've added : #!/usr/bin/python # -*- coding: utf-8 -*- in the begining of my script but str = str.replace('Ç', 'C') str =...
1
by: electrixnow | last post by:
Help!, I need to compile this code with static libs so it run on another XP machine that does'nt have MS Studio installed. When I compile now I get an ERROR: 1>------ Rebuild All started:...
2
by: karen987 | last post by:
Can someone please tell me how to alter this code if it needs altering, . thanks in advance. 1. The form keeps focusing on "username" and won't submit. The 2 username functions may be clashing?...
10
by: Cliff | last post by:
Greetings, I have been trying to teach myself C++ over the past few weeks and have finally came across a problem I could not fix. I made a simple program that prints out a square or rectangle...
3
by: Veli | last post by:
Good Day I have published a website and everything works expect for my forms. I can't seem to send the attachments to the email address according to the uploader. I don't know what i am doing...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.