Still not quite sure I understand the problem completely, but here are some ideas to get you started. Your workflow requires three steps:
- Fetch the XML data from the external API.
- Parse the XML (the SOAP namespace may require some attention) into a usable format.
- Filter and display the parsed data in your template.
I assume your existing code is based on this example for using feeds in your template? In this case, the feed me plugin does steps 1 & 2 for you, at least to a degree. The documentation doesn't actually mention if the plugin is capable of handling SOAP documents, but since you mentioned that part is working, I'll assume it does. If it doesn't, you can also bypass the plugin and use PHP's SoapClient directly, though that might be a bit tedious.
With Feed Me, you have to figure out what the primary element in the XML result is. You will need to make sure the document has a consistent format at least to that degree. Based on your example, the primary element is probably the student
node. So the code would look something like this:
{% set params = {
url: 'http://path.to/feed/',
type: 'xml',
element: 'student',
cache: 60,
} %}
{% set feed = craft.feedme.feed(params) %}
Now all that remains is to loop through the results and display the data. If you're not sure about the fields in the XML documents, you can use Twig to check if specific fields are defined and display them:
{% for student in feed %}
{% if student.studentAttributes is defined %}
Employee ID: {{ student.studentAttributes.emplid ?? 'No employee ID' }}
PVI: {{ student.studentAttributes.pvi ?? 'Not found' }}
{% endif %}
{# ... #}
{% endfor %}
Hopefully this helps. If you're having trouble with a specific step (displaying fields conditionally, parsing the data with Feed Me, etc) please post the code you're having trouble with, this will make it easier to find what's going wrong.