<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
looks like you are running from within a jsp file - the standard way of doing it is with the: cms:include or cms:contentload and cms:contentshow tags<BR><BR><BR><BR><BR> <BR>
> Date: Fri, 18 Mar 2011 14:50:29 +0000<BR>> From: bteixeira666@gmail.com<BR>> To: opencms-dev@opencms.org<BR>> Subject: [opencms-dev] How to get HTML from a file in VFS<BR>> <BR>> Hello there<BR>> <BR>> I'm developing a feature that extracts some info from an HTML file in the VFS.<BR>> This is an example of how I'm reading the file contents:<BR>> <BR>> <%<BR>> String path = "path/to/file.html";<BR>> CmsFile menuFile = cmsObj.readFile(path);<BR>> out.print(new String(menuFile.getContents()));<BR>> %><BR>> <BR>> The problem: I don't see the full HTML content of the file; instead I<BR>> see something like:<BR>> <BR>> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<BR>> xsi:noNamespaceSchemaLocation="http://www.opencms.org/dtd/6.0/xmlpage.xsd"><BR>> <page language="pt"><BR>> <element name="body"><BR>> <links><BR>> <link name="link8" internal="false" type="A"><BR>> <target><![CDATA[...]]></target><BR>> </link><BR>> <link name="link9" internal="false" type="A"><BR>> <target><![CDATA[...]]></target><BR>> </link><BR>> </links><BR>> <content><![CDATA[ ....... the actual HTML contents, but<BR>> without the links....... ]]></content><BR>> </element><BR>> </page><BR>> </pages><BR>> <BR>> I think you get the idea.<BR>> Is there any built-in way of getting the HTML contents as they are see<BR>> in the workplace editor?<BR>> <BR>> Thank you.<BR>> <BR>> _______________________________________________<BR>> This mail is sent to you from the opencms-dev mailing list<BR>> To change your list options, or to unsubscribe from the list, please visit<BR>> http://lists.opencms.org/mailman/listinfo/opencms-dev<BR> </body>
</html>