[opencms-dev] hidden xsd or how to read xml of an archive

enrarjcob at alum.us.es enrarjcob at alum.us.es
Fri Mar 7 17:32:09 CET 2008


Thanks, but, How Can I use it exactly? 

Which class is from filterContent? Can you explain your example? Thanks again!


----- Mensaje original -----
De: "Rodriguez, Adrian" <A.Rodriguez at comundus.com>
Fecha: Jueves, Marzo 6, 2008 11:00 ombr
Asunto: Re: [opencms-dev] hidden xsd or how to read xml of an archive
A: The OpenCms mailing list <opencms-dev at opencms.org>


> 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
> [ 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
> 
> 
> _______________________________________________
> 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
> 



More information about the opencms-dev mailing list