Q&A

Q1:What's the difference between a class and an object?
A1: The word object is often misused when referring to the entities in OOP. A class is a definition or a template for how a type of object is to be constructed. There's no memory allocated, so it cannot be used as anything other than a blueprint. An object is the result when the class definition is used to create an entity with allocated memory that can be used to store and manipulate data. The term an instance of a class is almost synonymous with object. It's just a bit more precise.
Q2:Why is it preferable to use code that can read generic XML files over code that reads only specific files?
A2: In the interest of efficiency, it's always better to reuse code that's known to be correct. ...

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.