Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part I: The Basics > XML Data Islands

Hour 4. XML Data Islands

In general, building a project by creating and combining smaller files makes the application more flexible and maintainable. So far, you've followed that strategy as you've built your examples. However, that's not the only possible approach. This hour will explore ways to insert the XML code directly into the HTML files. When this is done, the XML code is known as an island.

It's considered good programming practice to create separate files whenever possible, so you may be wondering why you'd want to insert the XML code into the HTML files. One example is when the amount of code is very small and the overhead of creating an additional file and importing it is just too high. The second example is when the XML code has no reasonable chance of being used in another project. If you have a file that will only be used with another file, it makes sense to bind them together to avoid confusion.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial