How to open xml format file? ( as document)

3 ビュー (過去 30 日間)
JaeSung Choi
JaeSung Choi 2018 年 7 月 26 日
コメント済み: JaeSung Choi 2018 年 7 月 26 日
I tried to open 'enwiki-latest-abstract22.xml.gz-rss.xml' file, but MATLAB Editor says 'There is not enough memory to open enwiki-latest-abstract22.xml in the Editor.
And Error message at command window as
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at javax.swing.text.GapContent.allocateArray(GapContent.java:94)
at javax.swing.text.GapVector.resize(GapVector.java:214)
at javax.swing.text.GapVector.shiftEnd(GapVector.java:229)
at javax.swing.text.GapContent.shiftEnd(GapContent.java:345)
at javax.swing.text.GapVector.open(GapVector.java:201)
at javax.swing.text.GapVector.replace(GapVector.java:142)
at javax.swing.text.GapContent.insertString(GapContent.java:132)
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:723)
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
at javax.swing.text.DefaultEditorKit.read(DefaultEditorKit.java:273)
at com.mathworks.widgets.datamodel.TextFileBackingStore.readIntoDocument(TextFileBackingStore.java:206)
at com.mathworks.widgets.datamodel.TextFileBackingStore.loadDocumentFromFile(TextFileBackingStore.java:175)
at com.mathworks.widgets.datamodel.TextFileBackingStore.doLoad(TextFileBackingStore.java:247)
at com.mathworks.widgets.datamodel.TextFileBackingStore.doLoad(TextFileBackingStore.java:32)
at com.mathworks.widgets.datamodel.AbstractBackingStore.load(AbstractBackingStore.java:114)
at com.mathworks.mde.editor.EditorView.reload(EditorView.java:410)
at com.mathworks.mde.editor.EditorView.initSyntaxTextPane(EditorView.java:859)
at com.mathworks.mde.editor.EditorView.<init>(EditorView.java:222)
at com.mathworks.mde.editor.EditorView.<init>(EditorView.java:153)
at com.mathworks.mde.editor.EditorViewClient.init(EditorViewClient.java:232)
at com.mathworks.mde.editor.EditorViewClient.<init>(EditorViewClient.java:181)
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(MatlabEditorApplication.java:693)
at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(MatlabEditorApplication.java:678)
at
com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClientFromExistingFile(MatlabEditorApplication.java:670)
at com.mathworks.mde.editor.MatlabEditorApplication.access$300(MatlabEditorApplication.java:73)
at com.mathworks.mde.editor.MatlabEditorApplication$4.runWithOutput(MatlabEditorApplication.java:395)
at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(AWTUtilities.java:475)
at com.mathworks.jmi.AWTUtilities$WatchedRunnable.run(AWTUtilities.java:436)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)

採用された回答

Walter Roberson
Walter Roberson 2018 年 7 月 26 日
Please recheck which file you were working with. You talk about opening xml.gz-rss.xml but the error message is about .xml withotu .gz-rss.xml .
enwiki-latest-abstract22.xml is not directly available at that link, but enwiki-latest-abstract22.xml.gz is there; it is about 16 megabytes, and expands into 130 megabytes.
I was able to open the complete file in the MATLAB editor on my OS-X system. Go into Preferences -> General -> Java Heap Size and configure a larger heap size. I happened to have 2048 Mb configured on my system.
You might have to restart MATLAB after you configure the Java Heap Size.
  1 件のコメント
JaeSung Choi
JaeSung Choi 2018 年 7 月 26 日
I tried to open both files. Really thanks for your answer!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeJava Package Integration についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by