[Tutor] xml parsing without a root element

davidheiserca at gmail.com davidheiserca at gmail.com
Tue Aug 30 20:20:26 CEST 2011


Can you encapsulate the contents of the file in a root element before processing?


  ----- Original Message ----- 
  From: rail shafigulin 
  To: tutor at python.org 
  Sent: Tuesday, August 30, 2011 10:27 AM
  Subject: [Tutor] xml parsing without a root element


  hello everyone. 

  i need to parse a an xml-like file. the problem that i'm facing is that this file doesn't have the root element but in all other terms it is the same as xml, i.e

  <tag1>
  </tag1>

  <tag2>
  </tag2>

  <tag3/>

  does anybody know if there is a module in python that allows to process an xml file without a root element? i tried ElementTree but it didn't work.

  any help is appreciated
  thanks



------------------------------------------------------------------------------


  _______________________________________________
  Tutor maillist  -  Tutor at python.org
  To unsubscribe or change subscription options:
  http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110830/3427255a/attachment.html>


More information about the Tutor mailing list