daveofgv
Well-known member
hello all -
I have the below code that can change the data in one XML tag. This is what I want, however, I want it to change all the XML's in a complete directory:
Currently, I can only do one XML at a time - I need it to recursive through all XMLs in one directory and subfolders.
Is this a quick change?
thanks in advanced.
daveofgv
I have the below code that can change the data in one XML tag. This is what I want, however, I want it to change all the XML's in a complete directory:
VB.NET:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim MyXML As New XmlDocument()
MyXML.Load("C:\Users\mycomputer\Desktop\New folder (3)\54_80199366_345614993\80199366_345614993_Equipments.xml")
Dim MyXMLNode As XmlNode = MyXML.SelectSingleNode("Documents/Document/Invoice/Supplier/Number")
If MyXMLNode IsNot Nothing Then
MyXMLNode.ChildNodes(0).InnerText = ("hello")
Else
'Do whatever
End If ' Save the Xml.
MyXML.Save("C:\Users\mycomputer\Desktop\New folder (3)\54_80199366_345614993\80199366_345614993_EquipmentLog2.xml")
End Sub
Currently, I can only do one XML at a time - I need it to recursive through all XMLs in one directory and subfolders.
Is this a quick change?
thanks in advanced.
daveofgv