i have a large xml file that couldn't be validated, because it contains some numeric tag names, here is how it looks:
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<0>
<id>545f7bf982efa41a496379d2</id>
<org_id>1</org_id>
<status>open</status>
<name>Carrefour</name>
<address>1175 rue Guillaume Du Vair</address>
<created>1415543801.5059</created>
</0>
<1>
<id>545f7bf982efa41a496379d4</id>
<org_id>1</org_id>
<status>open</status>
<name>Carrefour Angers Grand Maine</name>
<address>rue Du Grand Launay</address>
<created>1415543801.5146</created>
</1>
<2>
<id>545f7bf982efa41a496379d6</id>
<org_id>1</org_id>
<status>open</status>
<name>Carrefour Angers Saint Serge</name>
<address>boulevard Gaston Ramon</address>
<created>1415543801.523</created>
</2>
<3>
<id>545f7bf982efa41a496379d8</id>
<org_id>1</org_id>
<status>open</status>
<name>Carrefour Anglet Bab2</name>
<address>avenue Jean Léon Laporte</address>
<created>1415543801.5302</created>
</3>
<4>
<id>545f7bf982efa41a496379da</id>
<org_id>1</org_id>
<status>open</status>
<name>Carrefour Angoulins</name>
<address>route De Rochefort</address>
<created>1415543801.5385</created>
</4>
<5>
<id>545f7bf982efa41a496379dc</id>
<org_id>1</org_id>
<status>open</status>
<name>Carrefour Annecy</name>
<address>134 avenue De Genève</address>
<created>1415543801.5458</created>
</5>
.
.
.
</root>
What i am trying to do is to replace automatically each numeric tag with a valid one, for example:
replace
Replace <0>...</0> with <A0>...</A0>
my file contains thousands of these, is there any tool i can use to do it automatically .
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…