我试图从返回的 XML 响应中获取“msg”的值,如您所见,“msg”被找到了两次。如何从返回的响应中获取“msg”的所有值?
这是一个返回值“msg”的示例,发现错误:
<?xml version="1.0" encoding="UTF-8" ?>
<matches software="LanguageTool" version="2.6-SNAPSHOT" buildDate="2014-05-26 09:16">
<language shortname="en-US" name="English (US)" />
<error fromy="0" fromx="0" toy="0" tox="4" ruleId="UPPERCASE_SENTENCE_START" msg="This sentence does not start with an uppercase letter" replacements="This" context="this is a error" contextoffset="0" offset="0" errorlength="4" category="Capitalization" locqualityissuetype="typographical" />
<error fromy="0" fromx="8" toy="0" tox="9" ruleId="EN_A_VS_AN" msg="Use 'an' instead of 'a' if the following word starts with a vowel sound, e.g. 'an article', 'an hour'" replacements="an" context="this is a error" contextoffset="8" offset="8" errorlength="1" category="Miscellaneous" locqualityissuetype="misspelling" />
</matches>