Get multiple values from an xml file using one of the following commands or together awk/perl/script

Hello,
I have a requirement to extract the value from multiple xml node and print out the values to new file to compare.
Would be done using either awk/perl or some unix script.

For example sample input file:

.....
.....
    <factories xmi:type="resources.jdbc:DataSource" xmi:id="DataSource_1368723785468" name="ds_db2_arctic_xa" jndiName="ds/db2arcticxa" description="DB2 JCC XA-capable data source using the IBM Data Server Driver for JDBC and SQLJ. IBM Data Server Driver is the next generation of the DB2 Universal JCC driver. This data source type is configurable in version 7.0 and later nodes." providerType="DB2 Using IBM JCC Driver (XA)" authMechanismPreference="BASIC_PASSWORD" authDataAlias="lxarctibc1Node01/arcticwasdb" manageCachedHandles="false" logMissingTransactionContext="true" xaRecoveryAuthAlias="lxarctibc1Node01/arcticwasdb" diagnoseConnectionUsage="false" relationalResourceAdapter="builtin_rra" statementCacheSize="50" datasourceHelperClassname="com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper">
      <propertySet xmi:id="J2EEResourcePropertySet_1368723785478">
        <resourceProperties xmi:id="J2EEResourceProperty_1368723785478" name="databaseName" type="java.lang.String" value="DWASCER2" description="This is a required property. This is an actual database name, not the locally catalogued database name. The IBM Data Server driver does not rely on information catalogued in the DB2 database directory." required="true" ignore="false" confidential="false" supportsDynamicUpdates="false"/>
        <resourceProperties xmi:id="J2EEResourceProperty_1368723785479" name="driverType" type="java.lang.Integer" value="4" description="The JDBC connectivity type of a data source. If you want to use a type 4 driver, set the value to 4. If you want to use a type 2 driver, set the value to 2. On WebSphere Application Server for Z/OS, driverType 2 uses RRS and supports 2-phase commit processing." required="true" ignore="false" confidential="false" supportsDynamicUpdates="false"/>
          .....
		  .....
		  .....
        <resourceProperties xmi:id="J2EEResourceProperty_1368723785551" name="clientRerouteAlternateServerName" type="java.lang.String" value="" description="The list of alternate server name(s) for the DB2 server.  If more than one alternate server name is specified, then the names must be separated by a comma.  For example, host1,host2." required="false" ignore="false" confidential="false" supportsDynamicUpdates="false"/>
        <resourceProperties xmi:id="J2EEResourceProperty_1368723785552" name="unbindClientRerouteListFromJndi" type="java.lang.Boolean" value="false" description="Used with testConnection only.  When set to true, clientRerouteServerListJNDIName will be unbound from JNDI name space when performing testConnection." required="false" ignore="false" confidential="false" supportsDynamicUpdates="false"/>
      </propertySet>
      <connectionPool xmi:id="ConnectionPool_1368723785494" connectionTimeout="10" maxConnections="100" minConnections="10" reapTime="58" unusedTimeout="60" agedTimeout="0" purgePolicy="EntirePool" numberOfSharedPoolPartitions="0" numberOfUnsharedPoolPartitions="0" numberOfFreePoolPartitions="0" freePoolDistributionTableSize="0" surgeThreshold="-1" surgeCreationInterval="0" testConnection="false" testConnectionInterval="0" stuckTimerTime="0" stuckTime="0" stuckThreshold="0"/>
      <mapping xmi:id="MappingModule_1368723786749" mappingConfigAlias="" authDataAlias="lxarctibc1Node01/arcticwasdb"/>
    </factories>
.....
.....
.....
 <processDefinitions xmi:type="processexec:JavaProcessDef" xmi:id="JavaProcessDef_1183122130078" workingDirectory="${USER_INSTALL_ROOT}" executableTargetKind="JAVA_CLASS" executableTarget="com.ibm.ws.runtime.WsServer">
    <execution xmi:id="ProcessExecution_1183122130078" processPriority="20" runAsUser="" runAsGroup=""/>
    <ioRedirect xmi:id="OutputRedirect_1183122130078" stdoutFilename="${ARCTIC_LOG_DIR}/native_stdout.log" stderrFilename="${ARCTIC_LOG_DIR}/native_stderr.log"/>
    <environment xmi:id="Property_1368724145382" name="IBM_HEAPDUMPDIR" value="/dmp_was_c85" required="false"/>
    <environment xmi:id="Property_1368724163596" name="IBM_JAVACOREDIR" value="/dmp_was_c85" required="false"/>
    <environment xmi:id="Property_1368724227012" name="JAVA_DUMP_OPTS" value="ONANYSIGNAL(HEAPDUMP,JAVADUMP)" required="false"/>
    <monitoringPolicy xmi:id="MonitoringPolicy_1183122130078" maximumStartupAttempts="3" pingInterval="60" pingTimeout="300" autoRestart="true" nodeRestartState="STOPPED"/>
    <jvmEntries xmi:id="JavaVirtualMachine_1183122130078" verboseModeClass="false" verboseModeGarbageCollection="true" verboseModeJNI="false" initialHeapSize="1024" maximumHeapSize="2048" runHProf="false" hprofArguments="" debugMode="false" debugArgs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777" genericJvmArguments="-Xgc:maxScavengeBeforeGlobal=200 -Xverbosegclog:${DMP_LOG_DIR}/gc_was_c85,20,20000 -Dcom.ibm.ws.cdi.immediate.ejb.start=true -Dsibs.site=LX" executableJarFileName="" disableJIT="false">
      <systemProperties xmi:id="Property_1" name="com.ibm.security.jgss.debug" value="off" required="false"/>
      <systemProperties xmi:id="Property_2" name="com.ibm.security.krb5.Krb5Debug" value="off" required="false"/>
    </jvmEntries>
  </processDefinitions>
.....
.....

The output should look like this:

DataSource
name = ds_db2_arctic_xa    
jndiName = ds/db2arcticxa  
connectionTimeout = 10
axConnections = 100 
minConnections = 10 
reapTime = 58 
unusedTimeout = 60 
agedTimeout = 0 
purgePolicy = EntirePool  

DataSource
....
....
....

jvmEntries
initialHeapSize = 1024  
maximumHeapSize = 2048

Thanks in advance.

By the way what you have tried so far ?

Search by string at the beginning of the line within the file, there are several easy ways using grep / awk / perl for example grep '<jvmEntries' file.xml. It should also be easy but I'm failing to take the values that are within the "..." ex. the value "1024" or "EntirePool"