简体   繁体   中英

How to create XML document with datatype using .NET or JAVA

I have a XSD for validating my XML document. This document I am generating/creating with the help of .NET/Java.

But after creating the XML document while validating it with the predefined XSD it is saying data types are not matching.

I need to create the XML with datatypes.

How to approach this problem? Any Documentation, Link would be helpful. Thanks

For Java, JAXB is the usual solution; lives under 'javax.xml.bind' package, and the reference implementation is even bundled with JDK 1.6 and above. You can generate POJOs (that have appropriate annotations) from Schema, or Schema from annotated POJOs, and it is reasonably efficient as well when used correctly (avoiding use of DOM as input or output etc).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM