我想解析xml文件中的文本.考虑到我在file.xml中有一些行
<s id="1792387-2">Castro Verde is situated in the Baixo Alentejo Subregion within a territory known locally as the Campo Branco (English: White Plains).</s>
Run Code Online (Sandbox Code Playgroud)
如何从上面的行中提取以下文本:
Castro Verde is situated in the Baixo Alentejo Subregion within a territory known locally as the Campo Branco (English: White Plains).
Run Code Online (Sandbox Code Playgroud)
在对文本进行一些更改后,我希望返回带有相同标记的更改文本,如下所示.
<s id="1792387-2"> Changed Text </s>
Run Code Online (Sandbox Code Playgroud)
请任何建议.谢谢!