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. Advertisements

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. DP
    Replies:
    0
    Views:
    1,407
  2. BODIN
    Replies:
    0
    Views:
    761
    BODIN
    Dec 8, 2003
  3. cvissy
    Replies:
    0
    Views:
    838
    cvissy
    Nov 16, 2004
  4. Novitas
    Replies:
    1
    Views:
    747
    Ian Pilcher
    Sep 14, 2005
  5. __PPS__
    Replies:
    2
    Views:
    634
    __PPS__
    Sep 27, 2005
  6. hara
    Replies:
    2
    Views:
    234
    Brian Helterline
    May 30, 2006
  7. Replies:
    4
    Views:
    390
    Ted Zlatanov
    Sep 13, 2006
  8. Larry Lindstrom
    Replies:
    19
    Views:
    1,577
    Jonathan N. Little
    Jun 12, 2012
Loading...