Myths on Maps

  • Log in
  • « Work Done April 9th
  • Changes that need to be made »

Handy methods for finding stuff in xml files

Posted by gregster on 09 Apr 2013 in Documentation

When adding events to events.xml you'll need to browse the existing events to make sure you aren't adding a duplicate. Here are a couple of special searches you can use to look through the events file a bit more rapidly:

1) If you want to find all events that take place in, say, Crete, you can run an XPath search (there's a search field at the top-left of oXygen) to do it. That search looks like this:

//event[.//placeName[@corresp='places.xml#crete']]

Paste the above line in its entirety in to the XPath search field and hit 'Enter'.
To search for another place, change crete to the xml:id of the place you want to find - leave the quotes alone!

2) Something similar can be done for characters:

//event[.//persName[@corresp='characters.xml#eurystheus']]

Again, paste the above line in to the XPath search field and hit 'Enter'

3) You can combine this functionality, too. To find all events which include Eurystheus and Mycenae, try this:

//event[(.//persName[@corresp='characters.xml#eurystheus']) and (.//placeName[@corresp='places.xml#mycenae'])]

That's all one line, and it goes in that XPath field.

This entry was posted by Greg and filed under Documentation.

Myths on Maps

This project will focus on deploying an interactive map of Europe with overlays for Greek and Roman myths, history, people and events.
SVN instructions for MoM editors
Development URL
HCMC Blogs home
  • Archives
  • Categories

Search

XML Feeds

  • Atom: Posts
  • RSS 2.0: Posts
What is RSS?

This collection ©2023 by admin • Help • Website engine