Hi Bouanani,
I am not sure if I understood your question correctly.
Would you like to detect policies or target attributes (subject, action, ...)?
For both:
You have to load the policies in their XML form. This can be done (as described in the getting started guide:
http://dev.herasaf.org/wiki/display/XACMLCORE/GettingStarted) with the PolicyMarshaller.
For a file-source for example:
Evaluatable eval = PolicyMarshaller.unmarshal(policyFile);
The Evaluatable is then either a PolicyType or a PolicySetType.
For extracting the attributes:
You can access the target attributes within the PolicyType or the PolicySetType:
PolicyType policy = ...
TargetType target = policy.getTarget();
SubjectsType subjects = target.getSubjects();
...
Let me know if we can give you further support.
Best regards,
Florian