rest - How to create XML file that uses two DTDs? -


We are building an REST service where the client will keep a financial portfolio from XML. Portfolio XML will use a published standard XML DTD. We want to add some bits data to Portfolio XML.

We want to have the ability to validate XML against published DTD. But if we add additional fields then the DTD verification will no longer fail. Is there a way to create a new DTD, which includes existing DTD and our new areas?

You can include standard DTD published as an external DTD, then your XML document Create an internal DTD, or create another DTD that adds new elements and add one too.
It has been taken from an internal DTD (for example):

  & lt ;? Xml version = "1.0"? & Gt; & Lt ;! DOCTYPE note [& lt ;! Trigger Note (From, From, Title, Body) & gt; & Lt ;! Element (#PCDATA) & gt; By & lt ;! ELEMENT (#PCDATA) & gt; & Lt ;! ELEMENT TOP (#PCDATA) & gt; & Lt ;! ELEMENT body (#PCDATA) & gt; ] & Gt; & Lt; Comment & gt; & Lt; Gt; & gt; Toe & lt; / Gt; & Lt; To & gt; Known & lt; /> & Lt; Title & gt; Reminder & lt; / Heading & gt; & Lt; Body & gt; Do not forget me at the end of this week & lt; / Body & gt; & Lt; / Comment & gt;  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -