Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

__author__ = 'ilya' 

 

from lxml import etree 

 

ELEMENT_TYPE = type(etree.Element("Element")) 

 

UPNP_NS = 'urn:schemas-upnp-org:metadata-1-0/upnp/' 

UPNP_EVENT_NS = 'urn:schemas-upnp-org:event-1-0' 

UPNP_DEVICE_NS = 'urn:schemas-upnp-org:device-1-0' 

UPNP_SERVICE_NS = 'urn:schemas-upnp-org:service-1-0' 

 

DLNA_NS = 'urn:schemas-dlna-org:metadata-1-0' 

DLNA_DEVICE_NS = 'urn:schemas-dlna-org:device-1-0' 

 

DC_NS = 'http://purl.org/dc/elements/1.1/' 

PV_NS = 'http://www.pv.com/pvns/' 

 

DIDLLITE_NS = 'urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/' 

 

namespaces = { 

    DC_NS: 'dc', 

    UPNP_NS: 'upnp', 

    DLNA_NS: 'dlna', 

    PV_NS: 'pv', 

    DLNA_DEVICE_NS: 'dev', 

    UPNP_EVENT_NS: 'e', 

} 

 

for k, v in namespaces.items(): 

    etree.register_namespace(v, k)