I am writing a program which needs to be able to do to simple things to an xml file. The first is to be able to read in an element's content given the elements tag. The second is to be able to replace the element's content with different content. I want a library that gives me two functions such as
getContent(tags);
replaceContent(tags,newContent);
What is the best software available to do this (preferably free).

