看板 [ java ]
討論串[問題]JDOM取值
共 5 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓3(3推 0噓 0→)留言3則,0人參與, 最新作者hougzou (囧> 黑掉了!!)時間17年前 (2008/06/26 22:29), 編輯資訊
0
0
0
內容預覽:
如果真的這麼討厭List,又確定要尋找的element只會有一個,那就.... Element rootElement = document.getRootElement();. Element ele =(Element) XPath.selectSingleNode(rootElement, "
(還有215個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者qrtt1 (null)時間17年前 (2008/06/26 10:02), 編輯資訊
0
0
0
內容預覽:
SAXBuilder builder = new SAXBuilder(false);. Document document = builder.build(new File(Hello.class.getResource(. "sample.xml").getFile()));. List l =
(還有57個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者TonyQ (骨頭)時間17年前 (2008/06/26 01:28), 編輯資訊
0
0
0
內容預覽:
what?. 會用list的原因是因為同樣tag元素可能是一個到多個,. 所以用個Collection裝起來而已。. 就概念上不複雜,沒有甚麼好『精簡』可言的啊。 -.-;;. --. ▄▅▆▇███▇▆▅▄▃ ╰┼╯─╮ . ◥███████████◣ ╰┼╯=│=│. ◥██████─────
(還有30個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者H45 (!H45)時間17年前 (2008/06/25 22:31), 編輯資訊
0
0
0
內容預覽:
這樣嗎?. SAXBuilder builder = new SAXBuilder(false);. Document document = builder.build("D:\\JDOM.xml");. Element rootElement = document.getRootElement()
(還有81個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者caty1010 (MR.Q)時間17年前 (2008/06/25 22:16), 編輯資訊
0
0
0
內容預覽:
請問大家使用JDOM抓XML元素的值. ex:. <say>. <word>hello</word>. </say>. 抓那個hello,一定要用List和iterator的方式抓嗎?. Element word;. SAXBuilder builder = new SAXBuilder(false
(還有225個字)
首頁
上一頁
1
下一頁
尾頁