[opencms-dev] hidden xsd or how to read xml of an archive
Rodriguez, Adrian
A.Rodriguez at comundus.com
Thu Mar 6 10:57:15 CET 2008
Hi,
I don't know in which context you are trying to obtain the content definition, but if you have the path of the file, you can get its content definition using CmsXmlContentFactory this way:
CmsObject cms= ... ;
CmsFile file=cms.readFile(resourcePath);
CmsXmlContent content=CmsXmlContentFactory.unmarshal(cms,file);
CmsXmlContentDefinition contentDefinition=filterContent.getContentDefinition();
Regarding your first option, I think there's no support for hidden fields in XmlContent (Corrections welcome).
Regards,
Adrián
-----Ursprüngliche Nachricht-----
Von: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org]Im Auftrag von
enrarjcob at alum.us.es
Gesendet: Donnerstag, 6. März 2008 09:22
An: opencms-dev at opencms.org
Betreff: [opencms-dev] hidden xsd or how to read xml of an archive
Hi,
I want to store the type of the structured content, and i think there are 2 possibilities:
First One: Create a hidden widget with an String with the type (the automatic form dont show that).
Second One: To read the XML of the file to check the xsd file that it references
I dont know how to do both solutions, Any Idea? Thanxs!
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list