PHP: regular expression to find out and retrieve values from xml attributes

FB

New Member
How can I write a regular expression to retrieve values from xml node?Actually the node structure is very big. So we can't traverse easily, so I want to read as normal text file and hope I can write a regex to find out the matching elements.\[code\]<node1> <node2>str</node2> <node3>Text</node3> <myvalue>Here is the values string..</myvalue></node1>\[/code\]The above is the pattern I want to retrieve values \[code\]<myvalue></myvalue>\[/code\] but in my xml there are so many other node contains the \[code\]<myvalue>\[/code\] child. So only way to find out the appropriate node which I want is in the above pattern. The only change in value rest of the node values are same \[code\]<node2>str</node2>\[/code\], \[code\]<node3>Text</node3>\[/code\] are always same.So how can I write the regex for php?
 
Back
Top