On Tue, Jul 30, 2013 at 9:51 AM, saritha N <saritha.0...@gmail.com> wrote:
> Thanks for your reply Raghavendra, > > Thanks for the update. Request to mark postgresql group email while replying so it will help much if other's have better idea as well if any correction in my test case. > Whatever you have sent its very useful for me.I need to add one more node > between the values,like > <values>Infosys<place>Bangalore</place></values> > How to add? > > postgres=# update xdata set xmlcode='<values>Infosys<place>Bangalore</place></values>' where cast(xpath('//values/text()',xmlcode) as text[]) = '{Infosys}'; UPDATE 1 postgres=# select xmlparse(content xmlcode) from xdata ; xmlparse -------------------------------------------------- <values>Enterprisedb</values> <values>Wipro</values> <values>Infosys<place>Bangalore</place></values> (3 rows) Some of the xml related links: http://www.postgresql.org/docs/9.2/static/functions-xml.html http://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.2#Ensure_that_xpath.28.29_escapes_special_characters_in_string_values --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/