[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Nested XML files

  • From: Usha_R2@v...
  • To: xml-dev@i...
  • Date: Wed, 14 Oct 1998 17:47:26 +0530

nested xml files
Hi! All,
   We can have a DTD as a collection of DTD files. Similarly, can a XML
file contain other xml files. 

Consider the following example:

--------file2.dtd---------

<!ELEMENT Y (#PCDATA)>

---------------------------

Now I use this in file1.dtd 

*********File1.dtd**********

<!ELEMENT file1 (X+ , Y)>
<!ELEMENT X (#PCDATA)>
<!ENTITY  % file2 SYSTEM "file2.dtd">
%file2;

*****************************

Defining File1.xml as follows:

---------------File1.xml--------------

<?xml version="1.0"?>
<!DOCTYPE file1 SYSTEM "file1.dtd">
<file1>
        <X>xyz</X>
        <Y>123</Y>
</file1>

-------------------------------------------

Now in File1.xml, I can have both "X" and "Y" elements. 

Can I use one xml file in another. For example instead of defining <Y>
element again in File1.xml, suppose if I have File2.xml as follows:

*******file2.xml***********

<Y>123</Y>

***************************

How do I use these in File1.xml again. Can I define an external entity
for an .xml file also. I tried this and it seems to be giving some
problems. Please let me know if its possible.


Thanks in advance
Usha







K. Usha Rani
 
Dept        : Applications
Phone    : (080) - 2869920
Email     :  usha_r2@v...

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.