Can I search for a tag in am xml file and have them all listed together?
-
There is an emulator Frontend I am working on setting up called HyperSpin that relies heavily on xml database files. In those files are crc tags which are used to ensure that you have the exact same rom as the person who created the database. But I have noticed that some of those database files are missing that crc information or have them in the wrong place. These files can be quite large and would take forever for me to scan through them manually. I was wondering if there was a way that I could just search for something like <crc> and have it show me every line that has that tag in it. This way I could just do a quick scan with my eyes and it should jump out to me if there is a <crc> line that is blank. Then maybe click on that line and see what game it belongs to and try to fix it. Let me show you an example below of what I am trying to do.
For this example I am going to use the Atari 2600.xml database file which can be found here . Here is a small section of what it looks like:
<game name="Alien Greed (USA) (Unl)" index="" image=""> <description>Alien Greed (USA) (Unl)</description> <cloneof></cloneof> <crc>E895E0BD</crc> <manufacturer>Neotokeo2001 & Atari2600land</manufacturer> <year>2007</year> <genre>Adventure</genre> <rating>Other - NR (Not Rated)</rating> <enabled>Yes</enabled> </game> <game name="Alien Greed 2 (USA) (Unl)" index="" image=""> <description>Alien Greed 2 (USA) (Unl)</description> <cloneof></cloneof> <crc>4D2A7EBA</crc> <manufacturer>Neotokeo2001 & Atari2600land</manufacturer> <year>2008</year> <genre>Adventure</genre> <rating>Other - NR (Not Rated)</rating> <enabled>Yes</enabled> </game> <game name="Alien Greed 3 (USA) (Unl)" index="" image=""> <description>Alien Greed 3 (USA) (Unl)</description> <cloneof></cloneof> <crc>EF4DB11A</crc> <manufacturer>Neotokeo2001 & Atari2600land</manufacturer> <year>2010</year> <genre>Adventure</genre> <rating>Other - NR (Not Rated)</rating> <enabled>Yes</enabled> </game> <game name="Alien Greed 4 - Adventure (USA) (Unl)" index="" image=""> <description>Alien Greed 4 - Adventure (USA) (Unl)</description> <cloneof></cloneof> <crc></crc> <manufacturer></manufacturer> <year>123D4862</year> <genre>Adventure</genre> <rating>Other - NR (Not Rated)</rating> <enabled>Yes</enabled> </game> <game name="Allia Quest (France) (Unl)" index="" image=""> <description>Allia Quest (France) (Unl)</description> <cloneof></cloneof> <crc>0D6C9729</crc> <manufacturer>Ebivision</manufacturer> <year>2001</year> <genre>Shoot-'Em-Up</genre> <rating>Other - NR (Not Rated)</rating> <enabled>Yes</enabled> </game>
Now if you scroll down to where it says Alien Greed 4 you can see that the crc information for that game is missing because it just shows <crc></crc>. But if you notice it looks like that information was accidentally put inside the year tag. Now scrolling through a list of code like that for 667 games in this example and trying to find which games are missing information in their crc tag is slow and tedious. So I was wondering if there was a way I could search for that tag and have it listed like this instead:
<crc>E895E0BD</crc> <crc>4D2A7EBA</crc> <crc>EF4DB11A</crc> <crc></crc> <crc>0D6C9729</crc>
This way I could just scroll through a list like that and it would immediate pop out to me where the crc information is missing. Then I could either search for the crc number that is directly before or after the blank one and see what game it belongs to and try to fix it.
Hopefully I was able to explain myself well enough and that something like what I am talking about actually exists. Thanks.
-
open find dialog and put <crc> in find what and press button Find all in Current
This gives you a result view where you can click on the found crc and it will jump to the specific location.Cheers
Claudia -
Thank you so much. That is exactly what I was looking for.
-
Your welcome
Cheers
Claudia