Get a proxml element as text element
in
Programming Questions
•
1 year ago
Hello,
I have a xml file with the following structure:
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <data>
- <person>
- <Name Name="John"/>
- <Surname Surname="Smith"/>
- </person>
- </data>
By using xml I get both elements into variables. But I now want to write the elements as text into my sketch.
When using the following lines of code I get this: <Name Name="John"/> But I only want to have "John" saved in the variable stringName.
- stringName = person.getChild(0).toString();
- println(stringName);
How can I seperate the single Name from the rest of the line? So that I only have "John" saved to the variable stringName.
Thanks everyone!!
1