Im trying to make an aspx page display as xml for an rss feed
the output looks like its formed ok when i view the source:
<?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0"><channel><title>phil</title><link>http://www.mysite.co.uk/blog.aspx</link><description>phils blog</description><item><title>Test Blog</title><link>
http://www.phil.co.uk/blog/test-blog.aspx</link><description>test description</description><pubDate>2011-10-21T14:19:28</pubDate><guid> http://www.phil.co.uk/blog/test-blog.aspx</guid></item></channel></rss>
But when i view the page in chrome it just shows the text from the nodes and not a visual of the xml structure. What do i need to do?
You could use the Google Chrome Tree Extension.
I will suggest you to Use EXtensible Stylesheet Language (XSTL)
You can display xml directly on browser without using any ASPX page. It is used to styling of your xml.
Let me know, if you have any concern.
Related
This may be simple, although i'm having some trouble finding a solution.
i create a sitemap for my website in an xml file.i display content of xml file in aspx file.
but i want display xmlfile not in aspx.
when i use response.redirect("sitemap.xml"),it shows tree but i want to show only all content in sequential not in tree.
like this:
content of xmlfile:
<t><t1 p="s1"></t1><t2 p="s2"></t2></t>
but i want address bar=sitemap.xml and show like this:
p=s1p=s2 .....
any idea?
Some browsers will respect XSL declarations at the top of xml files. If you have such a declaration at the top of your xml file like this:
<?xml-stylesheet type="text/xsl" href="YourTransform.xsl"?>
It will apply the transform specified allowing you to output the xml however you want. However, support is not universal.
I have set this up so that in umbraco I paste the iframe link into a multiple textfield, and then in the XSLT I would do something like:
<xsl:value-of select="embedCode" disable-output-escaping="yes"/>
Which would display the video fine, but I am now trying to do this in razor and I can't seem to get it to display at all? I've tried using html raw but can't get it working
This is basically what I have at the moment which just spits out the iframe url
<div>#item.embedCode</div>
Anyone have any ideas please?
I want to export a few Pages to pdf/xls. By Pages I mean as the eye sees it - a screenshot of the Page's contents. I know how to build pdf/xls documents using 3rd party tools but is there any way to quickly export the rendered contents of say a Panel?
edit: maybe a tool that can render the page's output as a browser would, and save it as an image file?
There is an open source console program named wkhtmltopdf which you could call from asp.net to convert the page. It can convert to PDF or an image with wkhtmltoimage (JPG, PNG, etc.) using the webkit rendering engine.
Check my answer to this question to see an example of how to convert from a html to a pdf using C#:
Easiest way of porting html table data to readable document
I can recommend http://www.screengrab.org/ for firefox.
I am creating a aspx page using visual studio 2008.
and linking it with a css via
but when i build it page opens with only html format and CSS look and feel is not applying
Please tell what can i do to make to correct.
But its working correct on IE...
Have you tried validating the resulting HTML page and the CSS file (HTML Validator) (CSS Validator)
If validating and resolving errors does not help, please post your HTML and CSS.
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/