-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document type detection #65
Comments
Yes, that would be nice, but unfortunately each marshaller is tightly bound to a specific set of XML Schemas. |
Thank you! |
Okay great. So I will the 2 methods for all UBL versions and create an updated release 9.0.3 |
Hello,
Are there any functions that can detect the type of document I pass into "readXMLDOM" and automatically set the schema (e.g., invoice, catalogue)? Currently, I have to manually specify the document type before reading it (e.g., UBL21Marshaller.catalogue()).
// Read
final Document aDoc = DOMReader.readXMLDOM (new ClassPathResource (sFilename),
new DOMReaderSettings ().setSchema (UBL21Marshaller.catalogue ().getSchema ()));
assertNotNull (sFilename, aDoc);
final CatalogueType aUBLObject = UBL21Marshaller.catalogue ().read (aDoc);
assertNotNull (sFilename, aUBLObject);
The text was updated successfully, but these errors were encountered: