JAXB Deserialization [Unmarshal] Given XML File

조회 수: 1 (최근 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 CenterFile Exchange에서 Structured 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