Results 1 to 1 of 1

Thread: [SOLVED] Change the PUBLIC identifier in QDomImplementation::createDocumentType

  1. #1
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default [SOLVED] Change the PUBLIC identifier in QDomImplementation::createDocumentType

    Hi everybody,

    I am trying to write a XML Document using QDomDocument, which should look like this:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE eagle SYSTEM "eagle.dtd">
    However, the result I am getting is this:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE eagle PUBLIC 'SYSTEM' 'eagle.dtd'>
    This is the code I am using:
    Qt Code:
    1. QDomImplementation implementation;
    2. QDomDocumentType docType = implementation.createDocumentType( "eagle", "SYSTEM", "eagle.dtd" );
    To copy to clipboard, switch view to plain text mode 

    How can I make it only display the SYSTEM identifier instead of PUBLIC 'SYSTEM'?

    Any suggestion is greatly appreciated!


    Added after 7 minutes:


    Nevermind, figured it out, the solution is to just use an empty QString like so:
    Qt Code:
    1. QDomImplementation implementation;
    2. QDomDocumentType docType = implementation.createDocumentType( "eagle", QString(), "eagle.dtd" );
    To copy to clipboard, switch view to plain text mode 
    Last edited by t0bias; 14th May 2021 at 15:12. Reason: solved

Similar Threads

  1. Replies: 3
    Last Post: 11th February 2018, 19:00
  2. identifier not found
    By bikonja in forum Newbie
    Replies: 1
    Last Post: 1st June 2015, 15:05
  3. Replies: 0
    Last Post: 7th May 2011, 20:43
  4. QDomImplementation real dom Document;
    By patrik08 in forum Qt Programming
    Replies: 11
    Last Post: 18th January 2011, 18:38
  5. Dynamic objects without identifier...
    By Bill in forum Newbie
    Replies: 7
    Last Post: 18th August 2009, 16:17

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.