Hi,
I wanted to add the following tag into my xml
<!DOCTYPE ndxml PUBLIC "-//NETDESPATCH//ENTITIES/Latin" "ndentity.ent">
Can any one let me know if it is possible through progress 4gl code.
Thanks,
Ankit
For DOM you would use INITIALIZE-DOCUMENT-TYPE.
Here is an example:
define variable refxml as handle no-undo.
define variable refroot as handle no-undo.
define variable refnode as handle no-undo.
create x-document refxml.
create x-noderef refroot.
create x-noderef refnode.
/* <!DOCTYPE ndxml PUBLIC "-//NETDESPATCH//ENTITIES/Latin" "ndentity.ent"> */
refxml:INITIALIZE-DOCUMENT-TYPE
("", "ndxml", "-//NETDESPATCH//ENTITIES/Latin", "ndentity.ent").
refxml:CREATE-NODE(refroot,"root","ELEMENT").
refxml:APPEND-CHILD(refroot).
refxml:CREATE-NODE(refnode,"child","ELEMENT").
refroot:APPEND-CHILD(refnode).
refxml:SAVE("file","example.xml").
Here is the output:
<?xml version="1.0" ?> <!DOCTYPE ndxml PUBLIC "-//NETDESPATCH//ENTITIES/Latin" "ndentity.ent"><ndxml/>
Thanks Alex!!! It's really helpful.