使用ライブラリ:Configuration
@Test public void test01() throws ConfigurationException { String xmlcontent = "<root><name>helo xml.</name></root>"; StringReader xmlin = new StringReader(xmlcontent); XMLConfiguration configuration = new XMLConfiguration(); configuration.load(xmlin); assertEquals("helo xml.", configuration.getString("name")); }
0 件のコメント:
コメントを投稿