[XML-SIG] replacing parts of xml using xpath

Colin Gillespie C.Gillespie at newcastle.ac.uk
Thu Sep 9 14:01:57 CEST 2004


Dear All,

Problem:
Example xml file:
<aaa>
	<bbb />
	<bbb />
<aaa>

I want to replace a part of the xml file, identified by an xpath
construct with something else. For example, 
replace //bbb[2] with <ccc />
To get 
<aaa>
	<bbb />
	<ccc />
<aaa>
 
Is this possible with pyxml & xpath? If not, can anyone suggest what
would be the best way to tackling this problem.

Thanks

Colin Gillespie


More information about the XML-SIG mailing list