I have a problem parsing/mapping a xml response from a API.
I would like to get the id numer of a keyword when the keyword.text is like 'Engels'
So i would like search in the xml response for the text 'Engels' than i would like to have the 'href' that belongs to that keyword. In this case http://www.wrts.nl/api/keywords/84576, i actually only need the id numer because than i can make a new request to the api with that information.
The xml-response looks like this:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<keyword-index>\n <keyword href=\"http://www.wrts.nl/api/keywords/83212\\">Duits</keyword> \n <keyword href=\"http://www.wrts.nl/api/keywords/84576\\">Engels</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/84562\\">Franconville</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/83711\\">Frans</keyword> \n <keyword href=\"http://www.wrts.nl/api/keywords/108275\\">FRvmbo1ldt</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/85763\\">Groep 4</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/84571\\">Kapitel 1</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/83213\\">klas 2</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/84563\\">Leerjaar 1</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/84570\\">leerjaar 1 h/ v</keyword>\n <keyword href=\"http://www.wrts.nl/api/keywords/84572\\">Lektion 1</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/83725\\">Uitgever</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/84578\\">unit 1</
\n
<keyword href=\"http://www.wrts.nl/api/keywords/84564\\">Unit\\xC3\\xA9 1</keyword>\n <keyword href=\"http://www.wrts.nl/api/keywords/85762\\">Woordpakket 1a</keyword>\n </keyword-index>\n"
How should i do this? Do i need to parse the xml first, or is there a way to search in the xml directly?
Thank you in advance, Regards Lasse