Display FORMATTED XML - asp.net

I am retrieving an XML document from a web service (UPS actually), and I can pull the information I need from the XML, but I can't get the XML to display in the XML format. I can get it to display in a label and literal, but its all ran together. The nodes aren't displaying. The nodes display in a text box control, but it still runs together (no brks)
Any idea how to take the XML document that i get from the service and display it just like it would if you open up an XML doc in IE?
Thanks
BTW... i have search all day for this and the only thing i could find is if i was displaying a static file, which i'm not. I also tried doing the stringbuilder/stringwriter, but no luck. I'm still pretty new at this stuff so i could be missing something.
HELP... PLEASE!

Try encompassing the XML in the
<pre>... your xml</pre>
tags.

Related

how to Add Header and Footer in word Document through XML and XSL in Asp.net?

I want to create a word document (.doc). I have a xml file and a xslt file. The first one has the data the second has the style. Then I combine these two through my c# code and create the doc file. Can you please help me into solving the below issues concerning the xslt? how can I define in each page’s header and footer for word document.It should display in each page.
Reverse engineer it.... Make a document with both of your desired headers/footers and then see how the document generates the two items. I'll be glad to help if a can. This answer is just a quick recommendation.

How to show image from the oracle database in asp.net

Hi there i need to show an image stored in the oracle database in (blob format i think).i have retrieved the image from database in dataset = dt.rows[0]["image"].how can convert the image to show it on the page.
Thanks.
In order to display it on a page, you need to serve the image as a separate resource from the web server.
Meaning, your page.aspx will have a tag with a src="your_image.aspx". In your_image.aspx, you need to clear response headers, make sure the Content-type is set correctly (image/jpg or something similar), put the contents of dt.rows[0]["image"] into a byte array and then write it out the binary image with something like Response.BinaryWrite(yourByteArray).
This is just a general outline. Use the googles for details :)

Alfresco webscript text fromat line break

I created an alfresco webscript and output file as xxx.get.text.ftl file.
In the output file(xxx.get.text.ftl), I am trying to create text version of newsletter. But I am not able to get text lines with line break.
if I put
AAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBB
I am getting as
AAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBB
Any Idea what could be the reason?
EDIT:
in my case i have page, template-instance,template and region. It turns out that when I call web script that fill the region it displays as text.But if I call full url like "www.xxx.com/news/my-news" it includes other components like template, page etc. and it turns the output to html. Because output for template or page is hard coded to text/html in surf.
If is text try to add
\n
at the end of line
Whitespace and especially new-line handling is always an issue for template languages because it is not clear whether the remove the new line after a closing template-tag or not. See the freemarker documentation for discussion: http://freemarker.org/docs/dgui_misc_whitespace.html
I think you just have to add an extra newline.

seam-gen and flex

I have integrated seam and flex with FlamingoDS
I got html file from mxml file and I stored it in WebContent folder it's fine
then I want to create link named as 'Plan' in menu.xhtml
My aim is to get that html file when i clicked on this button I don't know what to do for that
so, I have created some test.xhtml in that top element is the
for the template attribute this element I have given the template.html
and I used
then for 'Plan' link I gave the view="/test.xhtml"
It's fine when I clicked on that link I am getting the test.seam file which includes our html file but this html file is coming in some fixed area with scroll bars only eventhough there is a lot of space to fit
Please help...... me
First of all, it is very difficult to read your post. Please format it more readable.
Secondly, we can only guess what's wrong when we cannot see any code. But my hunch is that you are using s:decorate that includes some formating you are not aware of. This comes in standard seam-gen. Try removing that s:decorate stuff or point to another style you wish to use.

How to display XSL-transformed XML in ASP.NET page?

So far all the XML / XSLT I've worked with takes an XML document and transforms it to a standalone HTML webpage using an XSLT file.
In my web application, I'm using a web service to retrieve the XML document, which I need to render and make human-readable, and then insert that formatted content into a content placeholder in my master page.
The easiest way would be to append the XSLT to the retrieved XML file and link that to the content placeholder, but something tells me I can't just do that.
I took a look at these Stack Overflow pages, but they just want to render the straight XML whereas I want a transformed XML. Also, I need to be able to put it into my master page template.
This article shows how:
http://www.codeproject.com/Articles/37868/Beginners-Introduction-To-XSL-Transform-Rendering-XML-Data-using-XSL-Get-HTML-output.aspx
even if the spelling is as bad as mine...
Added
And here's another link that shows how, perhaps a bit more simply
http://www.aspfree.com/c/a/XML/Applying-XSLT-to-XML-Using-ASP.NET/2/

Resources