I spent too many hours on google trying to find the answer, can someone help? I would like to extract information that is nested between two strings (which are actually xml tags).
Example:
-some XML code is defined in a variable as text:
"<xml>
<title>Title here</title>
</xml>"
-I want to extract the data from that variable such that I am taking out the data nested in the tag: <title>Title here</title>
How can I search the variable and only keep the data between <title> and </title>? Or assign that data to a new variable?
Please ask if you don't understand what I'm asking.
Thanks in advance for your help!
Example:
-some XML code is defined in a variable as text:
"<xml>
<title>Title here</title>
</xml>"
-I want to extract the data from that variable such that I am taking out the data nested in the tag: <title>Title here</title>
How can I search the variable and only keep the data between <title> and </title>? Or assign that data to a new variable?
Please ask if you don't understand what I'm asking.
Thanks in advance for your help!