Hi All,
i have been informed previously that there are a few things that can be done in WildEdit to XML files. I have a large amount of XML files, about 400 where I need to swap the contents of the <FormalStatement> Tag with the contents of the <Paragraph> Tag that comes directly after it. Is this something that can be done quite quickly on all these files without having to copy and paste the data on each individual file.
Hope someone can help.
Thanks Phil
Swapping XML Tags
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Do you want to change
to
?
Try
Select Replacement format.
Unselect the option '.' does not match a newline character.
Code: Select all
<FormalStatement>
paragraph data
paragraph data
</FormalStatement>
<Paragraph>
formalstatement data
formalstatement data
</Paragraph>
Code: Select all
<FormalStatement>
formalstatement data
formalstatement data
</FormalStatement>
<Paragraph>
paragraph data
paragraph data
</Paragraph>
Try
Select Regular expression.Find what:
<FormalStatement>(.*?)</FormalStatement>(\s*)<Paragraph>(.*?)</Paragraph>
Replace with:
<FormalStatement>$3</FormalStatement>$2<Paragraph>$1</Paragraph>
Select Replacement format.
Unselect the option '.' does not match a newline character.