XLM prolgoue

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

    #1

    XLM prolgoue

    How do I go about creating the XML prologue like I want it to be?
    Specifically, I am trying to add encoding and some namespace stuff.

  • =?iso-8859-1?q?S=E9bastien_Boisg=E9rault?=

    #2
    Re: XLM prolgoue

    fscked wrote:
    How do I go about creating the XML prologue like I want it to be?
    Specifically, I am trying to add encoding and some namespace stuff.
    The XML declaration and the DTD that may appear in the prolog are
    optional.

    [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?
    [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

    If your encoding is UTF-8 (or ASCII ...) you don't need an XML
    declaration. Otherwise everything depends on the XML lib you
    use. For ElementTree, `tostring(elt, "ISO-8859-1")` for example
    will automatically include the right declaration at the beginning
    of your xml string ...

    There is no namespace information inside the prolog. Such
    "stuff" may appear inside the root element. Again, RTFM of
    your specific XML lib :) For ElementTree, see


    Cheers,

    SB

    Comment

    • =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

      #3
      Re: XLM prolgoue

      fscked schrieb:
      How do I go about creating the XML prologue like I want it to be?
      print "<?xml version='%s' encoding='%s'?% (version, encoding)

      Regards,
      Martin

      Comment

      Working...