How to display xml code in page?
Hi,
I have a string which content is a xml file, I want to display the content of string in xml mode, such like dispalying a xml file in IE browser. How to do it?
Thanks a lot!
set the MIME type of the page to "text/xml".
while creating the page if you create it with extention .xml, the system would automatically set this for the page.
and just place the string holding the XML in the layout .
<%=stringholdingxml%>
Regards
Raja
Similar Messages
-
How to display xml to html using xsl?
hi all...may i know how to display xml to html page?
i ve included <xsl:output method="html" indent="yes" /> inside my xsl file. i clicked on output.xml file and everything is displayed correctly but the format is xml instead of html. is there anyway to transform it to html?
below are my xsl and xml codes:
// xsl file
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<xsl:template match="/">
<html>
<body>
<h2>Document Contents</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="center">Document Name</th>
<th align="center">Document ID</th>
<th align="center">Owner</th>
</tr>
<xsl:for-each select="Document/Contents">
<tr>
<td><xsl:value-of select="DocumentName"/></td>
<td><xsl:value-of select="DocumentID"/></td>
<td><xsl:value-of select="Originator"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
// xml file
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="xsltStyleSheet.xsl"?>
<Document>
<Contents>
<DocumentName>register</DocumentName>
<DocumentID>1</DocumentID>
<Originator>hhh</Originator>
</Contents>
</Document>
</xsl:template></xsl:stylesheet>your XSL transforms to HTML (in fact XHTML): what more do you expect? did you expected anything different from the following output? if yes: what and why?
<html>
<body>
<h2>Document Contents</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="center">Document Name</th>
<th align="center">Document ID</th>
<th align="center">Owner</th>
</tr>
<tr>
<td>register</td>
<td>1</td>
<td>hhh</td>
</tr>
</table>
</body>
</html> -
How to display COMPANY CODE DESCRIPTION ON THE TOP LEFT OF PAGE
How to display COMPANY CODE DESCRIPTION(Field BUTXT) ON THE TOP LEFT OF EVERY PAGE OF THE REPORT GENERATED.
Actually I have collected BUTXT using
'select butxt into table itab from t001 where bukrs = p_bukrs'
where p_bukrs is the selection screen field.
REQUIREMENT: Depending on what company code we give on the selection screen, corresponding company code description(butxt) should be displayed at the top left of every page. how would i display it in TOP-OF-PAGE EVENT.Hi
It's very simple, but what is the need to use <b>into table itab</b> in your select query.
Rather, define a variable
data: v_butxt type t001-butxt.
Select butxt into v_butxt from t001 where bukrs = pbukrs.
TOP-OF-PAGE.
write :/ v_butxt.
Regards
Surya. -
How to Display XML in a UIWebView?
Hi everybody. I like how Safari displays XML files and I would like to emulate that functionality in an iPhone UIWebView. However, I just can't get it to look the same when passing a URL to the UIWebView.
For example, take a simple XML file like http://molottery.com/rss-num.xml. Viewing that in Safari looks okay, but passing that same URL into a UIWebView just shows a blank page.
I changed the web protocol from http to feed (feed://molottery.com/rss-num.xml) and it launches the page in Safari instead of my UIWebView. Looks good, but it quit my app... :- (
I noticed that XML files on the iPhone get re-routed through reader.mac.com so I tried appending that to my URL (http://reader.mac.com/mobile/v1/http://molottery.com/rss-num.xml) but that did not work either.
When I tried URLEncoding the string like Safari does (http://reader.mac.com/mobile/v1/http%3A%2F%2Fmolottery.com%2Frss-num.xml) I get a UIWebView saying that "This Application Is Viewable Only On iPhone".
So how can I emulate the regular Safari XML functionality inside my UIWebView? I will post my code upon request, if that will help. Any assistance from the Developer Community would be greatly appreciated.
Thanks!You may have better luck in the iPhone dev forums...
https://devforums.apple.com/community/iphone/web -
How to display source code of a webpage in Safari 7.0?
Hello. I'm unable to find how we used to once enable developing tools in Safari Preferences or simply CMD + ALT + A to display the source code of a webpage. Now I've no clue how to display source code of a webpage in Safari 7.0 on Mac OS X Mavericks. Help.
Hi gss2,
Make sure you are not under the Apple icon but under Safari>Preferences>Advanced. All the way at the bottom check the box that says: "Show Develop menu in menu bar."
Now go back to the page you want to get the source code for, right click on it and choose Inspect Element. Hope this helps.
Cheers,
LURDS LLC -
hi there
does any one know how to embed xml codes in jsp??
if yes please how and where can i more information about it..
thanksHave done this for SVG JSP (an xml document) as such:
<?xml version="1.0" encoding="US-ASCII"?>
<%@ page contentType="image/svg+xml"%>
.....and so on
Only caveat- Have noticed that <?xml version="1.0" encoding="US-ASCII"?>
needs to be the FIRST line of your page - make sure no carriage return between other scriplet code like this
Do NOT do like this:
<% ...code
%>
<?xml version="1.0" encoding="US-ASCII"?>
rather like this (if you have scriplets first):
<% ...code
%><?xml version="1.0" encoding="US-ASCII"?>
....and so on
Works for SVG- Hope helps in your situation
Jim -
How to display BAR-CODE through ABAP report
Hi,
Could you please help me, how to display BAR-CODE through the ABAP report.
I am writing below code, but BAR-CODE is not displaying on report.
PRINT-CONTROL FUNCTION 'SBP01'.
WRITE: 20 BAR_CODE1 NO-GAP.
PRINT-CONTROL FUNCTION 'SBS01'.
Regards,
SSRAJU.Hi RAJU,
you can see this forum link and its sub-links, here it is clear about it.
Re: Barcode printing on report
Thanks & Regards,
Dileep .C -
How to display region from one page on the other page?
Hi,
I'd like to ask if someone know how to display region created on page X on page Y.
I've tried to create a "URL" region on Y but this doesn't work and I generally think this is blind way.
Next I've found an internal function "flows_020100.wwv_flow_disp_page_plugs()" that works pretty well (PL/SQL type region with calling the function) except that is displaying only regions on the same page. I know it's dirty hack but ...
Any ideas or hints how to solve this? Thanks ...have a look here ...
http://www.oracle.com/technology/products/database/application_express/pdf/apex_best_practices.pdf -
How to display XML file that XI sent to my j2ee appl?
Hi,
In my scenario File->XI->J2EE appl.
I got XML page cannot be displayed.
XML document must have a top level element. Error processing resource 'http://localhost:7001/Invoke/DisplayRes'.
I deployed my .ear file on BEA Weblogic application server9.0
I found no error when i tested in SXI_MONI and RWB->Message monitor as well.
This is my servlet code:
public class DisplayRes extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
BufferedReader brin =new BufferedReader(new InputStreamReader(request.getInputStream()));
String inputLine;
StringBuffer sBuf = new StringBuffer();
PrintWriter out = response.getWriter();
response.setContentType("text/xml");
while ((inputLine = brin.readLine()) != null)
sBuf.append(inputLine);
//out.setContentType("text/xml");
//out.println(sBuf.toString());
out.write(sBuf.toString());
brin.close();
out.flush();
What went wrong.All helpful answers are highly rewarded.
ThanksHi
Can anyone tell me how XI sends messages to applications like J2EE. In REceiver comm channel, I think we specify about the target system like J2EE appl.
Aadapter Type: HTTP
Receiver
Transport Protocol: HTTP1.0
Message Protocol: XI payload in HTTP body
Adapter Engine: Integration Server
Addressing Type: URL address
Target host: localhost
Service Number: 7001(Port number of Weblogic appl server--where my J2EE appl is deployed).
Path : /Invoke/DisplayRes/
Authentication Type:Use Logon Data for SAP System
Content Type: text/xml
Username: xiappluser
password: xx
XML code: UTF-8
I suppose XI sends msgs to http://localhost:7001/Invoke/DisplayRes/........
in this example if am correct?
Then I have given all tyhe necessary setting but my servlet is not able to display XML msg in browser?
This is my servlet code:
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
PrintWriter out = response.getWriter();
BufferedReader brin =new BufferedReader(new InputStreamReader(request.getInputStream()));
String inputLine;
StringBuffer sBuf = new StringBuffer();
response.setContentType("text/xml");
while ((inputLine = brin.readLine()) != null)
sBuf.append(inputLine);
out.println("hi");
out.println(sBuf.toString());
brin.close();
out.flush();
What went wrong?
Help me, all helpful answers are highly rewarded.
Thanks -
How to display Xml in a JEditorPane(in an applet)
Hi All,
I have an applet and i want to display xml in a JEditorPane in an applet. This xml document has a xsl attached to it for transformation. How can i do the transformation??
Help or sample code or link to a sample code is highly appreciated!!!!
Thanks
RaguLook this servlet which does a transformation. JEditorPane could call this servlet (with the method setPage) to do the transformation:
public class SampleXSLTServlet extends javax.servlet.http.HttpServlet {
public final static String FS = System.getProperty("file.separator");
// Respond to HTTP GET requests from browsers.
public void doGet (javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException, java.io.IOException
// Set content type for HTML.
response.setContentType("text/html; charset=UTF-8");
// Output goes to the response PrintWriter.
java.io.PrintWriter out = response.getWriter());
try
javax.xml.transform.TransformerFactory tFactory =
javax.xml.transform.TransformerFactory.newInstance();
//get the real path for xml and xsl files.
String ctx = getServletContext().getRealPath("") + FS;
// Get the XML input document and the stylesheet, both in the servlet
// engine document directory.
javax.xml.transform.Source xmlSource =
new javax.xml.transform.stream.StreamSource
(new java.net.URL("file", "", ctx+"foo.xml").openStream());
javax.xml.transform.Source xslSource =
new javax.xml.transform.stream.StreamSource
(new java.net.URL("file", "", ctx+"foo.xsl").openStream());
// Generate the transformer.
javax.xml.transform.Transformer transformer =
tFactory.newTransformer(xslSource);
// Perform the transformation, sending the output to the response.
transformer.transform(xmlSource,
new javax.xml.transform.stream.StreamResult(out));
// If an Exception occurs, return the error to the client.
catch (Exception e)
out.write(e.getMessage());
e.printStackTrace(out);
// Close the PrintWriter.
out.close(); -
How to display 20 records per page in jsp
Hi All,
I have table contains 1000 records. How can i display 20 records per page using jsp.
can anyone help...hi, I am unable to use the ejb in my jsp page. Really? Then why not ask a question in the JSP or EJB forum?
I want
the output of my ejb in jsp page.
if possible please suggest me .Do you? Whats the output? What are you trying to do? Where's your code? What's the problem? Have you even bothered to read the tutorial?
>
thanxNo, thank you....
....for posting another non-sensical useless post in the wrong forum -
XML report output displays xml code instead of pdf
Hi,
My Release is R12.1.1, An xml report whose output is set as pdf. when running this report output is coming as xml code instead of pdf
another xml report ouput is coming in word instead of pdf
is there any additional settings required to display in pdf format
eventhough i configured pasta.csg & ixlib.cfg files
Thanks,
Alig
Edited by: user12257829 on Jun 2, 2010 11:41 PM
Edited by: user12257829 on Jun 2, 2010 11:41 PMHi,
Helios
Even i tried both MOS documents u have referenced, as both reports compeleting normally without any error
one thing i want to know can application use the same pasta.cfg file for pdf and text format
as i have a single pasta.cfg configured
Thanks
Alig
Edited by: user12257829 on Jun 3, 2010 1:18 AM
Edited by: user12257829 on Jun 3, 2010 1:18 AM -
How to display XML content in a JSP
Hi,
can anyone help me in displaying xml content in a JSP?I think you want to display value from XML page to the
JSP.If thats the case you can try out this
xml...
<component-profile>
<property name="parm" value="Hi"/>
</component-profile>
jsp...
<% var=profile.getProperty("parm");%>
Hope this helps
gEorgE -
How to display XML file in java swing
hi all
now i do my M.Sc., project on data maining.this time i have one problem,thats i can't display XML file in swing frame.so any one know this plz give me that idea or code.
Thanks to all.
RSKOne way of doing that is to use JDOM...
u create an xml tree, and then output using XMLOutputter class...it will be displayed in text...im not sure if thats what u want...however, if u do want to represent it visually then u may need to draw a tree...u may use the Graphics2D for that...there are alot of ways to do such thing, and the 2 possibilities arent the best...depends on what u want...elaborate more pls. -
How to display xml attributes in Layout (indesign cs2)
Hi,
Javascript
Indesign CS2
PC Version
Any one tell me, i want to display the ids in the margin. i read xml attribute, but i didn't know how to display to the margin. Help me.One way of doing that is to use JDOM...
u create an xml tree, and then output using XMLOutputter class...it will be displayed in text...im not sure if thats what u want...however, if u do want to represent it visually then u may need to draw a tree...u may use the Graphics2D for that...there are alot of ways to do such thing, and the 2 possibilities arent the best...depends on what u want...elaborate more pls.
Maybe you are looking for
-
Olá, boa tarde! No dia 26/01/2011 comprei um iPhone 4 na credenciada Tim de Itabira/MG. Por volta do dia 20/05 ele começou a apresentar problema com o microfone interno do aparelho. Ao receber ou fazer uma ligação eu escuto a pessoa, porém, a pessoa
-
2nd gen A TV I can hear but not see on the TV when trying to stream TV from the iPad2
2nd Gen ATV I can hear but not see on the TV when trying to stream TV from the iPad2
-
Really weird behaviour. iPhoto shows all my Events in the Events browser. It shows how many photos in each, and if I scrub the event I see the thumbnails of each of the pictures. However if I open the Event there are no photos displayed. Hitting 'i'
-
Profit center planning - Revenue planning
Hi, Out client is service provider and all the scale of rates are mapped to pricing proceedure in SD. Now the requirement is for revenue planning. Revenue planning can be done through profit center accounting. But he do not want to enter the values i
-
Hi, I have a Indesign user who inherited a PC with Indesign installed. Indesign works with old PC user profile but not the new user. Any ideas how I can resolve this?