私は次のように見えるNOAAXMLを解析しています:
<time-layout time-coordinate="local" summarization="12hourly">
<layout-key>k-p12h-n14-1</layout-key>
<start-valid-time period-name="Tonight">2012-12-18T18:00:00-08:00</start-valid-time>
<start-valid-time period-name="Wednesday">2012-12-19T06:00:00-08:00</start-valid-time>
<start-valid-time period-name="Wednesday Night">2012-12-19T18:00:00-08:00</start-valid-time>
<start-valid-time period-name="Thursday">2012-12-20T06:00:00-08:00</start-valid-time>
<start-valid-time period-name="Thursday Night">2012-12-20T18:00:00-08:00</start-valid-time>
<start-valid-time period-name="Friday">2012-12-21T06:00:00-08:00</start-valid-time>
<start-valid-time period-name="Friday Night">2012-12-21T18:00:00-08:00</start-valid-time>
<start-valid-time period-name="Saturday">2012-12-22T06:00:00-08:00</start-valid-time>
<start-valid-time period-name="Saturday Night">2012-12-22T18:00:00-08:00</start-valid-time>
<start-valid-time period-name="Sunday">2012-12-23T06:00:00-08:00</start-valid-time>
<start-valid-time period-name="Sunday Night">2012-12-23T18:00:00-08:00</start-valid-time>
<start-valid-time period-name="Monday">2012-12-24T06:00:00-08:00</start-valid-time>
<start-valid-time period-name="Monday Night">2012-12-24T18:00:00-08:00</start-valid-time>
<start-valid-time period-name="Christmas Day">2012-12-25T06:00:00-08:00</start-valid-time>
</time-layout>
ドキュメントには他にもタグがありますが、k-p12h-n14-1タグが欲しいです。
k-p12h-n14-1に続く期間名だけのperiod-name="*"を取得するにはどうすればよいですか?
私はそれを使用してそれを理解しようとしました:
List<XmlDom> wxday = xml.tags("time-layout","time-coordinate","summarization");
String wxd = wxday.child("layout-key");
String wxdd = wxday.equals("k-p12h-n14-1");
kind of lost....
考えてくれてありがとう。