0
I have a xml file with simple tag hierarchy as such:
<Parent Numbrt="X1">
<Namedchild>Yes</Namedchild>
....more children...
<Parent Number="X2">
<Namedchild>Yes</Namedchild>
....more children...
x10000 lines
I need to find the tag based on it's parameter value and replace the child tag value with Z based on a list (can be csv or otherwise) like this:
Parent New-Child-Value
X1 No
X4 No
X5 No
etc
for about 800 matches in the table.
The result would be that every parent I have in the source list has "No" as the child tag value in the original xml.
I'm most familiar with python
1NEVER parse XML with regex, see: https://stackoverflow.com/a/1732454/372239 – Toto – 2019-10-08T18:21:47.077
@Toto what tool/method would you suggest to get the desired output? – MartinE – 2019-10-08T18:40:06.517
Use a programing language that can parse XML, for example, with PHP: https://stackoverflow.com/q/3577641/372239
– Toto – 2019-10-08T18:45:32.750With Python, use https://stackoverflow.com/q/11709079/372239
– Toto – 2019-10-09T10:00:02.343