1 Reply Latest reply on May 10, 2011 2:06 AM by 776338

    Use of createURLInputStream

      Hi all,

      I'm using Python, dbxml 2.5.16, and I import in dbxml some XML structures I get from a REST API. The most appealing way seems to be using createURLInputStream.

      From the documentation (*), this function takes 3 parameters: baseId, systemId and publicId. I don't find the use of these 3 parameters : system id and public id are usually used in DTDs, and the definitions are strange: "The base ID / system ID /public ID to use for this URL"

      I only found an example where the second parameter is the url itself. And indeed the following code works, but I don't know exactly why:

      mgr = XmlManager()
      stream=mgr.createURLInputStream("", str(url), "")

      Does somebody has detailed information about createURLInputStream parameters?

      (*) http://xml-lang.com/Apress-The.Definitive.Guide.to/pg_0318.htm

      Laurent Le Meur
        • 1. Re: Use of createURLInputStream
          Hi Laurent,

          base id is the base system id URL which provides the base for any relative id part.
          system id is the possibly relative system id URL. If it's relative it's based on the base id, else it's taken as it is.
          public id is optional and just passed on for storage.

          Berkeley DB XML