0

I'm not going to parse a xml file but i want to move it in python. (i.e etree) I know about the basic of etree however all i want to know is about xml namespace. I've got 3 namespaces in code. Here is the code that i want to transfer.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns1:g2sMessage xmlns:ns1="http://www.gamingstandards.com/g2s/schemas/v1.0.3"><ns1:g2sBody ns1:dateTimeSent="2014-08-14T15:30:48.692+09:00" ns1:egmId="TestAppEGMID" ns1:hostId="1"><ns1:communications ns1:deviceId="0" ns1:sessionId="1001" ns1:sessionType="G2S_request" ns1:timeToLive="100" ns1:commandId="1001" ns1:dateTime="2014-08-14T06:30:48.696Z"><ns1:keepAlive/></ns1:communications></ns1:g2sBody></ns1:g2sMessage>TestAppEGMID1

Does anyone have an idea?

user3503072
  • 437
  • 1
  • 4
  • 10
  • You might find this [effbot post](http://effbot.org/zone/element-namespaces.htm) and this [SO question](http://stackoverflow.com/q/3895951/190597) useful. – unutbu Aug 18 '14 at 01:12
  • @unutbu Thank you but I've already try it and i can't use the number behind like "ns1","ns2"...etc. Only thing i can use is character ("ns", "nss"...so on) so... well i don't know. – user3503072 Aug 18 '14 at 03:02

0 Answers0