xml


Django the rss library generated xml Why does the browser does not resolve it?


URL configuration:
from blog.feeds import RssSiteNewsFeed
urlpatterns = [
url(r'^rss.xml$', RssSiteNewsFeed()),
]
Feeds module:
#!/use/bin/env python
# _*_ coding:utf-8 __
from django.contrib.syndication.views import Feed
from .models import Article
from django.utils.feedgenerator import Rss201rev2Feed
class CorrectMimeTypeFeed(Rss201rev2Feed):
mime_type = 'application/xml'
class RssSiteNewsFeed(Feed):
feed_type = CorrectMimeTypeFeed
author_name = ""
title = ""
link = ""
description = ""
def items(self):
return Article.objects.all().order_by('-created_time')[:5]
def item_title(self, item):
return item.title
def item_link(self, item):
return '/article/%s' % item.url
Then there is a strange phenomenon,
img
Obviously has been parsed out xml content, there are two issues:
Why parse out of the content is parsed twice?
The browser explicitly said is Content-Type: application / rss + xml;charset = utf-8 types of documents, but why show the exact string? And should not display the contents of xml format.

Related Links

Analyzing tree/structure of XML (tags referencing eachother)
Json parsing vs xml parsing? [closed]
unable to write xml sitemap in cakephp
Transform XML using XSL
VBS append a child node
Know when an image has completed loading from a server
treegrid with json in jqgrid (adjacency), jqgrid not displaying data with json?
Using XSLT can I prevent output of consecutive identical values?
Issues with comma separated data with XSLT
Spring servlet-context.xml error with mongo
iterating over all the subdirectories looking for XML files - Perl
aperte work flow import bpm file
Using XSLT to preprocess #ifdefs in XML
Read and change multiple XML files in Excel (2007) VBA
Groovy Grails test case error when converting to xml
Return xml data from action - CakePHP

Categories

HOME
delphi-7
jmeter
redux-form
mjml
battery
seo
spring-data-mongodb
cakephp-3.4
hugo
echo
vsm
crystal-lang
recordrtc
discrete-mathematics
distribution
mxgraph
php-5.6
endpoint
radgridview
sigma.js
named-entity-recognition
visual-studio-extensions
qliksense
displaytag
resourcebundle
direct3d11
android-maps
winexe
browser-sync
jaws
uitapgesturerecognizer
mustache
turfjs
android-gridview
gnat-gps
imx6
lubridate
xajax
python-pptx
swagger-php
watchman
c9.io
comparison-operators
magento-1.9.3
android-ibeacon
opennms
automapper-5
hammer.js
posixct
ngmaterial
libjpeg
universal-analytics
simplepie
greatest-n-per-group
jquery-jscrollpane
scaffolding
delta
firebase-security
respondcms
fuzzywuzzy
fink
exim4
assertion
iokit
oracle-spatial
ess
zscript
cwrsync
ansi
administration
human-computer-interface
jqmodal
cuba
kissfft
qscrollarea
artemis
embedded-fonts
abstract-data-type
windows-98
web-farm
subproject
failing-tests
entity-attribute-value
inline-formset
photolibrary
metaweblog
delimited-text
django-piston
lalr
google-wave
software-lifecycle
perl5.12

Resources

Encrypt Message