XPATH Python expression

d0zer

New Member
I am new to XPATH. I am using Python and the libxml module to try and only get the nodes such as \[code\]<TITLE>\[/code\] and \[code\]<TARGET>\[/code\] but only between certain dates. For example, when calling \[code\]python program.py 01/04/12 01/20/12\[/code\] I would only like to have the nodes between these two dates and I can not figure out a good way of going about this. Perhaps there is an XPATH expression that I could use. Can anyone suggest a solution?\[code\]<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE SCAN_LIST_OUTPUT SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/scan/scan_list_output.dtd"><SCAN_LIST_OUTPUT><RESPONSE><DATETIME>2012-02-13T14:54:21Z</DATETIME><SCAN_LIST> <SCAN> <REF>scan/121212112.61291</REF> <TYPE>Scheduled</TYPE> <TITLE><![CDATA[Company A 5/19/2012]]></TITLE> <USER_LOGIN>username</USER_LOGIN> <LAUNCH_DATETIME>2012-05-20T04:10:05Z</LAUNCH_DATETIME> <STATUS> <STATE>Finished</STATE> </STATUS> <TARGET><![CDATA[10.1.1.1, 10.1.1.1, 10.1.1.1, 10.1.1.1...]]></TARGET> </SCAN> <SCAN> <REF>scan/12121212.1212</REF> <TYPE>Scheduled</TYPE> <TITLE><![CDATA[Company B 5/19/2012]]></TITLE> <USER_LOGIN>username</USER_LOGIN> <LAUNCH_DATETIME>2012-05-19T04:10:06Z</LAUNCH_DATETIME> <STATUS> <STATE>Finished</STATE> </STATUS> <TARGET><![CDATA[10.2.2.2, 10.2.3.3, 10.2.14.5, 10.1.2...]]></TARGET> </SCAN>\[/code\]
 
Back
Top