I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Sunday 24 June 2012

xmllint tutorial

http://linux.byexamples.com/archives/565/your-xml-friend-xpath-command-line-xmllint/ is a very small tutorial on how to use xmllint. I think I should try it a little bit further. Currently it did not do what I wanted it to do.


while trying xmllint on a settings.xml file from maven, I was having trouble getting the content out. After looking for the way to do it in internet, I found out that you need to set the namespace you need to look for even if it is the default namespace. I am not completely sure about the reason why. Anyway, that is how I did it:

> setns r=http://maven.apache.org/xsd/settings-1.0.0.xsd
/ > cat //r:settings
/ > cat //r:id
/ > setns r=http://maven.apache.org/SETTINGS/1.0.0
/ > cat //r:id
-------
<id >jsf-app-profile </id >
-------
<id >snapshots.jboss.org </id >
-------
<id >repository.jboss.org </id >
-------
<id >sonar</id >