Skip to Main Content
XML and Related Technologies
book

XML and Related Technologies

by Atul kahate
May 2024
Beginner to intermediate content levelBeginner to intermediate
527 pages
17h 52m
English
Pearson India
Content preview from XML and Related Technologies
112 • XML & Related Technologies
3.3.2 Specifying Sequences, Occurrences and Choices
So far, we have discussed examples where the DTD contained just one element inside the root element. Real-
life examples are often far more complex than this.
Sequence
The first question is how we add more element type declarations to a DTD. For example, suppose that our
book DTD needs to contain the book name and author name. For this, we simply need to add a comma
between these two element type declarations. For example:
<!ELEMENT myBook (book_name, author)>
This declaration specifies that our XML document should contain exactly one book name, followed by
exactly ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XML Schema

XML Schema

Eric van der Vlist
XML in a Nutshell, 3rd Edition

XML in a Nutshell, 3rd Edition

Elliotte Rusty Harold, W. Scott Means
Beginning XML, 5th Edition

Beginning XML, 5th Edition

Danny Ayers, Liam R.E. Quin, Joe Fawcett

Publisher Resources

ISBN: 9781282652262