force.com - hardcode xml in salesforce -


im new salesforce want embed(hard code) xml code in vf page,when m trying im getting following error.

compilation error: <apex:page> required , must outermost tag in markup @ line 1 column 1

and code

<?xml version="1.0" encoding="utf-8"?> <apexpage xmlns="http://soap.sforce.com/2006/04/metadata">    <response>         <is_registered>yes</is_registered>         <is_workinghour>yes</is_workinghour>         <lead>00q9000000kwe6iear</lead>         <callid>04153c09-8018-4cba-b03e-cd98a80f30b0</callid>         <agent_number_count>3</agent_number_count>         <agent_list>         <agent id="1">         <agent_number>2228241485</agent_number>         <agent_code>0004</agent_code>         </agent>         <agent id="2">         <agent_number>2228321017</agent_number>         <agent_code>0003</agent_code>         </agent>         <agent id="3">         <agent_number>9699850686</agent_number>         <agent_code>0001</agent_code>         </agent>         </agent_list>         </response> </apexpage> 

visualforce pages not allow start markup tag except apex:page. if want display xml-markup on page can try:

<apex:page sidebar="false" showheader="false" applybodytag="false" applyhtmltag="false" contenttype="text/xml" standardstylesheets="false">    <!-- xml content here-->  </apex:page>

hope help


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -