XML parser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RC

    XML parser

    By default the

    document = xml.dom.minidom .parse(inputFil eName.xml)

    This will convert all the & to &
    But I want to convert the & back to &

    Is there a module or method in Python?
    I know there is such method in PHP, but I am
    new in Python.
    Thanks!
  • Diez B. Roggisch

    #2
    Re: XML parser

    RC wrote:
    By default the
    >
    document = xml.dom.minidom .parse(inputFil eName.xml)
    >
    This will convert all the & to &
    But I want to convert the & back to &
    >
    Is there a module or method in Python?
    I know there is such method in PHP, but I am
    new in Python.
    >>from xml.sax import saxutils
    >>saxutils.esca pe("&")
    '&'
    >>>
    Diez

    Comment

    Working...