フィルターのクリア

JAXB Deserialization [Unmarshal] Given XML File

3 ビュー (過去 30 日間)
Eric Tsai
Eric Tsai 2019 年 10 月 28 日
Hello,
I am trying to work with the JAXB jar file, downloaded from here. I have been able to add the jar file to my java path and imported the necessary classes in Matlab, however I am not sure how to use the unmarshal method:
public static <T> T unmarshal(File xml,Class<T> type)
From my understanding, the method will load the data from xml into a provided class. However, what does the inside of the class need to look like? Are there any examples of both an xml and class file that I could view the code? The following is what I am attempting in Matlab, where <unknown class> is the class I am not sure how to structure.
jaxb = JAXB.unmarshal('plants.xml',<unknown class>)
Thanks!

回答 (0 件)

カテゴリ

Help Center および File ExchangeStructured Data and XML Documents についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by