Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The answer lies in <strong>XML-DTD/Schema</strong>. The underlying schema so defined in the API results in the error. Though I suppose I donot wish to teach XML here, still a look at the following will make things clear.</p> <p>XML has two points to be considered:</p> <ul> <li><strong>Well Formed XML:</strong> perfect syntax</li> <li><strong>Valid XML:</strong> perfectly valid against a DTD (Document Type Definition) / Schema</li> </ul> <p><strong>Points about DTD:</strong> Suggested DTD upon your question: </p> <pre><code>&lt;!DOCTYPE transaction [ &lt;!ELEMENT address (#PCDATA)&gt; &lt;!ELEMENT amount (#PCDATA)&gt; &lt;!ELEMENT orderid (#PCDATA)&gt; ]&gt; </code></pre> <p>The above is a suggested DTD upon the structure you provided in the question. Since you are dealing with a particular API, it has such type of structure already defined in it. Alternative to this is the <strong>XML schema</strong>.</p> <p><strong>Points about XML Schema:</strong></p> <pre><code>&lt;xs:element name="transaction"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="address" type="xs:string"/&gt; &lt;xs:element name="amount" type="xs:string"/&gt; &lt;xs:element name="orderid" type="xs:string"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; </code></pre> <p>Currently, <strong>XML schema</strong> are used <strong>instead of DTDs</strong> as they are far more superior in defining the data structure for their users and provide an <strong>object-oriented approach</strong>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload