You
can also find the xpath from the CLI debug mode (use the operational
mode command debug mode on to enable this),
and then enter the configuration mode show command
that shows the object you are interested in copying. For example,
to see the xpath for the application object configuration in vsys1,
you would enter the show vsys vsys1 application command.
Look for the section of the output that begins with <requestcmd="get" obj=".
This signals the beginning of the xpath. In the following example,
the highlighted section is the xpath for the application objects
in vsys1:
admin@PA-3060# show vsys vsys1 application
(container-tag: vsys container-tag: entry key-tag: name value: vsys1 container-tag: application)
((eol-matched: . #t) (eol-matched: . #t) (eol-matched: . #t) (xpath-prefix: . /config/devices/entry[@name='localhost.localdomain']) (context-inserted-at-end-p: . #f))
/usr/local/bin/pan_ms_client --config-mode=default --set-prefix='set vsys vsys1 ' --cookie=2588252477840140 <<'EOF' |/usr/bin/less -X -E -M
<request cmd="get" obj="/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/application"></request>
EOF