Automatically remove empty attributes
Posted: Thu Sep 28, 2017 5:44 am
Hi all.
I was curious if OxygenXML has a way to automatically remove empty attributes from a file.
For example, in the file below, the attributes for month, day, image, video, audio, and era are sometimes empty. Is there an efficient way to find and remove those?
Thanks in advance for any help!
--Jason
I was curious if OxygenXML has a way to automatically remove empty attributes from a file.
For example, in the file below, the attributes for month, day, image, video, audio, and era are sometimes empty. Is there an efficient way to find and remove those?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<timeline>
<date title = "Billy Sunday born" year = "1862" month = "11" day = "9" notes = "William Ashley “Billy” Sunday was born to William and Mary Jane Sunday near Ames, Iowa. Five weeks later, the elder Sunday would die of pneumonia in Missouri while serving as a private in with Iowa’s Twenty-Third Volunteer Infantry Division." category = "fundamentalism" image = "" video = "" audio = "" era = "">
</date>
<date title = "Billy Sunday placed in orphanage" year = "1872" month = "" day = "" notes = "Billy Sunday’s mother placed him and his brother Ed in an orphanage due to the impoverished nature of their lives." category = "fundamentalism" image = "" video = "" audio = "" era = "">
</date>
<date title = "Billy Sunday begins playing professional baseball" year = "1883" month = "" day = "" notes = "Adrian Anson, manager of the Chicago White Stockings, recruited Billy Sunday to play for the team. He would continue to play in Chicago until 1887." category = "fundamentalism" image = "https://sabr.org/sites/default/files/images/AnsonCap-BBHOF.jpg" video = "" audio = "" era = "">
</date>
</timeline>
--Jason