Selecting specific XML elements...
I have a pretty big XML file structured with the TEI specification and I've been charged with the responsibility of basically migrating the XML into a Drupal installation but in order to do this, I need to extract only specific elements of the XML and simultaneously output these elements into a subsequent XML file for eventual use within Drupal.
Drupal aside for a second, the basic XML structure is as follows:
With that structure above, how could I extract (parse?) for only head and the paragraphs inside the div1 elements and put this all into another XML file?
<div1 tyle="section" n="1" org="uniform" sample="complete">
I tried to parse for what I wanted using the following...
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
So any help from you guys is appreciated as always. How can I parse for only certain elements and save the output as a straight up XML file?