Welcome to Dream.In.Code
Getting Help is Easy!

Join 107,639 Programmers for FREE! Ask your question and get quick answers from experts. There are 955 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



About XML

 
Reply to this topicStart new topic

About XML

fsloke
post 1 Jul, 2008 - 06:30 PM
Post #1


D.I.C Head

**
Joined: 19 Dec, 2007
Posts: 212



Thanked 1 times
My Contributions


CODE
<!ELEMENT message  (recipient, text, originator, create_date?)>
<!ATTLIST message
    id             ID      #REQUIRED
    gateway_id     CDATA        #REQUIRED
    status         CDATA        "U"
    encoding       CDATA        "7"
    priority       CDATA        "N"
    ref_no         CDATA        #IMPLIED
    status_report  CDATA        #IMPLIED
    flash_sms      CDATA        #IMPLIED
    src_port       CDATA        #IMPLIED
    dst_port       CDATA        #IMPLIED >
<!ELEMENT recipient   (#PCDATA)>
<!ELEMENT text        (#PCDATA)>
<!ELEMENT originator  (#PCDATA)>
<!ELEMENT create_date   (#PCDATA)>


How the xml sheet will look like?

in my opinion:
<message>
<recipient>12</recipient>
<text>Hello</text>
<originator>13</originator>
<create_date>2088-12-16</create_date>
</message>

What meanning of ATTLIST?

Thank you

This post has been edited by fsloke: 1 Jul, 2008 - 06:32 PM
User is offlineProfile CardPM

Go to the top of the page


fsloke
post 3 Jul, 2008 - 03:38 AM
Post #2


D.I.C Head

**
Joined: 19 Dec, 2007
Posts: 212



Thanked 1 times
My Contributions


I know ATTLIST is to put the default value.

ELEMENT cannot put the default value...

Thank you
User is offlineProfile CardPM

Go to the top of the page

perfectly.insane
post 12 Jul, 2008 - 07:39 PM
Post #3


D.I.C Regular

Group Icon
Joined: 22 Mar, 2008
Posts: 461



Thanked 33 times
My Contributions


QUOTE(fsloke @ 1 Jul, 2008 - 06:30 PM) *

CODE
<!ELEMENT message  (recipient, text, originator, create_date?)>
<!ATTLIST message
    id             ID      #REQUIRED
    gateway_id     CDATA        #REQUIRED
    status         CDATA        "U"
    encoding       CDATA        "7"
    priority       CDATA        "N"
    ref_no         CDATA        #IMPLIED
    status_report  CDATA        #IMPLIED
    flash_sms      CDATA        #IMPLIED
    src_port       CDATA        #IMPLIED
    dst_port       CDATA        #IMPLIED >
<!ELEMENT recipient   (#PCDATA)>
<!ELEMENT text        (#PCDATA)>
<!ELEMENT originator  (#PCDATA)>
<!ELEMENT create_date   (#PCDATA)>


How the xml sheet will look like?

in my opinion:
<message>
<recipient>12</recipient>
<text>Hello</text>
<originator>13</originator>
<create_date>2088-12-16</create_date>
</message>

What meanning of ATTLIST?

Thank you


ATTLIST specifies what attributes go with a specified element. The above XML tree will not validate against the aforementioned DTD as some required attributes have not been specified for the message element.

Instead of <message>, it should be

<message id="something" gateway_id="something" ...>
<recipient>12</recipient>
.
.
</message>
User is online!Profile CardPM

Go to the top of the page

indrora
post 26 Jul, 2008 - 08:13 PM
Post #4


New D.I.C Head

Group Icon
Joined: 25 Jul, 2008
Posts: 35



Dream Kudos: 25
My Contributions


ATTLIST is a list of attributes, their kind and if they're reqired, implied or have a default value.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/29/08 06:40PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month