JAXB Deserialization [Unmarshal] Given XML File

1 次查看(过去 30 天)
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