extract node value from soap response
Hi,
I have one soap xml response and it contains repeating node name. sample as below: Code:
<ax279:nodes xsi:type="ax277:ChildIdentifierList"> But issue is hello.world keep repeating under other tags too. And tag name <ax277:name> also repeating. If it was only one then I would have done with awk or grep or sed. But still there is problem: I used grep as below: Code:
grep -oPm1 "(?<=<ax277:name>)[^<]+" node.xml Then i tried with awk, it has returned all the values w.r.t that tag. Code:
awk -F "[><]" '/ax277:name/{print $3}' node.xml something like: awk -F "[><]" '/ax279:nodes/ax277:name/{print $3}' node.xml i tried above but again its syntax error. Any idea? |
To be honest, I don't understand what you want to achieve. If you want to extract a line named <ax277:name>test</ax277:name>, why don't you grep for it? Or what is it exactly you want to extract? What does hello.world have to do with it?
Regarding the syntax error: You use this string as a pattern - Code:
/ax279:nodes/ax277:name/ |
All times are GMT -5. The time now is 09:51 PM. |