Xerces Perl - Don't want DOCTYPE

Discussion in 'XML' started by Bob, Jan 13, 2004.

  1. Bob

    Bob Guest

    I use Xerces/Perl to create an XML document that will use Schemas
    instead of DTDs for validation. When I attempt to create a document
    with a docType of null, I get an error.

    This works:
    $docType = eval{$impl->createDocumentType("none", '', '')};
    $doc = eval{$impl->createDocument($nameSpace, 'dfStudy', $docType)};

    But then I'm stuck with a line in my XML file "<!DOCTYPE none>"
    (which, of course, is garbage)

    This does not work:
    $doc = eval{$impl->createDocument($nameSpace, 'dfStudy', '')};

    The error message is:
    No matching function for overloaded 'DOMImplementation_createDocument'
    at...

    Of course, the easy way to get rid of the DOCTYPE line would be to sed
    the output of the DOMWriter, but I'd rather make it clean by not
    having it there in the first place. Any ideas?

    Thanks
     
    Bob, Jan 13, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BODIN
    Replies:
    0
    Views:
    622
    BODIN
    Dec 8, 2003
  2. cvissy
    Replies:
    0
    Views:
    609
    cvissy
    Nov 16, 2004
  3. __PPS__
    Replies:
    2
    Views:
    568
    __PPS__
    Sep 27, 2005
  4. hara
    Replies:
    2
    Views:
    155
    Brian Helterline
    May 30, 2006
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,308
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page