• R/O
  • SSH
  • HTTPS

提交

标签

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

作業部屋の使い方を試しています。


Commit MetaInfo

修订版138 (tree)
时间2016-05-17 15:40:29
作者tuna_p

Log Message

InputStream読込み追加

更改概述

差异

--- branches/b4/webScraping/src/WebScraping/utility/LibraryXml.java (revision 137)
+++ branches/b4/webScraping/src/WebScraping/utility/LibraryXml.java (revision 138)
@@ -26,6 +26,7 @@
2626 import java.io.FileNotFoundException;
2727 import java.io.FileOutputStream;
2828 import java.io.IOException;
29+import java.io.InputStream;
2930 import java.util.logging.Level;
3031 import java.util.logging.Logger;
3132
@@ -137,6 +138,16 @@
137138 }
138139 }
139140
141+ public void read(InputStream is) {
142+ try {
143+ readdoc = builder.parse(is);
144+ xmlroot = readdoc.getDocumentElement();
145+
146+ } catch (SAXException | IOException ex) {
147+ Logger.getLogger(LibraryXml.class.getName()).log(Level.SEVERE, null, ex);
148+ }
149+ }
150+
140151 /* ---------------------------------------------------------------------- */
141152
142153 }
--- branches/b4/webScraping/src/WebScraping/utility/ScrapingXml.java (revision 137)
+++ branches/b4/webScraping/src/WebScraping/utility/ScrapingXml.java (revision 138)
@@ -24,6 +24,7 @@
2424
2525 import webScraping.core.SearchData;
2626 import java.io.File;
27+import java.io.InputStream;
2728 import java.util.ArrayList;
2829 import org.w3c.dom.Element;
2930 import org.w3c.dom.Node;
@@ -133,6 +134,11 @@
133134 elementget();
134135 }
135136
137+ public void load(InputStream is) {
138+ xlib.read(is);
139+ elementget();
140+ }
141+
136142 public void elementget() {
137143 root = xlib.getreadRoot(rootnameScraping);
138144 elementgetUrl();