Two Laptop Bag*
The moose likes XML and Related Technologies and the fly likes Want to write schema and xml in file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Want to write schema and xml in file" Watch "Want to write schema and xml in file" New topic
Author

Want to write schema and xml in file

Subbarao Kondabala
Greenhorn

Joined: May 17, 2005
Posts: 27
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


Thanks and Regards,
Subbarao Kondabala
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

No.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want to write schema and xml in file