On 19.02.2018 13:57, ADB101 wrote:
I can get some xpath's to work correctly, but only in "simple" (?) forms.
For example:

- name: Check current value
  xml:
    file: "{{oam_xml_file}}"
    xpath:
/x:Configuration/Setting[@Name='NGAMConfiguration']/Setting[@Name='DeployedComponent']/Setting[@Name='Agent']/Setting[@Name='WebGate']/Setting[@Name='Instance']/Setting[@Name='APPS_OAM11G']/Setting[@Name='UserDefinedParameters']/Setting[@Name='client_request_retry_attempts']/*
    content: text
    namespaces:
       x: http://www.w3.org/2001/XMLSchema

The issue is that I really need the full xpath to work as there are often several entries with the same "Name='*tag*'" that are only distinguishable
by their full path. I have tried even going one level down in the xml,
using a full path, and I still get "does not reference a node" error
message.

I'm not sure, but my hunch is that you need to postfix all with the namespace, so /x:Settings.... on all of them.

--
Kai Stian Olstad

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ba68dd1d34c565cba4139644f2b87f1c%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to