I use xmllint in my command-line scripts. The default mode of xmllint
does not support namespaces, so when I must deal with XML files with
namespaces I use the --shell mode of xmllint.

I noticed that the xpath command in the shell behaves differently than
the *xmllint --xpath* on the command line. For example if I want to
extract only the string portion of an attribute I use:

  xmllint --xpath "string(//node)"

When I want to do the same in the shell, I must use the *xpath* command,
because the *cat* command only supports node addresses.

  xpath "string(//node)"

Unfortunately the xpath command gives an output like:

  Object is a string : http://purl.obolibrary.org/obo/DOID_8545...

Is it possible to get a clean output with xmllint without using other tools?

Gökçe

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to