The Relationship Between Objects and XML

In object-oriented programming (OOP), a class is the definition of a collection of data and functions enclosed in a common wrapper. The name of the class is the name of the wrapper. When you're working with functions that are contained in classes, it's common to use the word method instead. Both terms will be used here.

To better understand the concept of classes, consider a simple oven. It has two properties, one that can be set to either on or off and one that can be set to a temperature. Once these values are set in the initialization, they remain at those values. Therefore, you need some method to change them. There would be two companion methods, one to change the on/off switch and the other to change ...

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.