【发布时间】:2018-07-23 08:19:06
【问题描述】:
<app:service xmlns:app="http://www.w3.org/2007/app"...>
<app:workspace>
<atom:title type="text">Data</atom:title>
<app:collection . . .>
<atom:title type="text">CourseContentSet</atom:title>
<demo:member-title>CourseContent</demo:member-title>
</app:collection>
<app:collection . . .>
<atom:title type="text">UnitContentSet</atom:title>
<demo:member-title>UnitContent</demo:member-title>
</app:collection>
</app:workspace>
</app:service>
我如何获得演示:会员头衔?
我尝试过这样做,但没有成功...
soapDatainJsonObject = XML.toJSONObject(soapmessageString);
JSONObjectsongs=soapDatainJsonObject.getJSONObject("app:service");
JSONObject songs2 = songs.getJSONObject("app:workspace");
String content = songs2.getString("app:collection")
System.out.println(content);
如何访问 XML 文件的内部部分?通过 JSON。 我想获取 CourseContent、UnitContent..等
【问题讨论】: