Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Want to write schema and xml in file

 
Subbarao Kondabala
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I can able to write DTD and XML in one file. Please find the below example.

<?xml version="1.0"?>
<!DOCTYPE note [
><!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend</body>
</note>

Now my doubt is can we write Schema and XML also in the same fashion without referring xsd file at the top.

If Yes can any one provide one example.

Thanks in Advance

Subbarao Kondabala
 
Paul Clapham
Sheriff
Pie
Posts: 20769
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic