<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am trying read a XML file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Please, see my code:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><%@ page 
import="java.util.*,org.opencms.*,org.opencms.jsp.*,org.opencms.xml.*, 
org.opencms.xml.content.*" %></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><%</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>// medias2site.xml</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>String filename   = 
request.getParameter("filename"); </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>String content = "[nothing read]";</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>
<DIV>CmsJspActionElement cms = new CmsJspActionElement(pageContext, 
request,response);</DIV>
<DIV> </DIV>
<DIV>org.opencms.file.CmsFile file = 
cms.getCmsObject().readFile(filename);</DIV>
<DIV> </DIV>
<DIV>try<BR>{<BR> CmsXmlContent c = 
CmsXmlContentFactory.unmarshal(cms.getCmsObject(), 
file);<BR>}<BR>catch(CmsXmlException e)<BR>{<BR> out.println("Erro:" + 
e.getMessage());<BR>}</DIV>
<DIV> </DIV>
<DIV>%></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>It display a tarsh error message:</DIV>
<DIV> </DIV>
<DIV><PRE><PRE>org.opencms.main.CmsRuntimeException: No XML schema set for content definition.
        at org.opencms.xml.content.CmsXmlContent.getContentDefinition(CmsXmlContent.java:544)
        at org.opencms.xml.content.CmsXmlContent.<init>(CmsXmlContent.java:137)
        at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:247)
        at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:115)
        at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:172)
        at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:129)
        at org.apache.jsp.WEB_002dINF.jsp.offline.sites.default_.rain.fileGenerator_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.offline.sites.default_.rain.fileGenerator_jsp:77)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
        at org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
        at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:170)
        at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:433)
        at org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
        at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:174)
        at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:467)
        at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:412)
        at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:719)
        at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1362)
        at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:151)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:831)
        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:652)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1203)
        at java.lang.Thread.run(Unknown Source)</PRE><PRE> </PRE><PRE>Can help me?</PRE><PRE> </PRE><PRE>Tks</PRE><PRE> </PRE></PRE></DIV>
<DIV></FONT> </DIV></BODY></HTML>