O'Reilly logo

Effective XML: 50 Specific Ways to Improve Your XML by Elliotte Rusty Harold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Out-of-Line Markup

Books like this one sometimes include complete XML documents as examples, sometimes just fragments thereof. To keep the examples correct, it's very useful if the fragments are automatically extracted from complete documents that can be validated, checked for well-formedness, and verified to be correct. This requires some way to mark off the portions of the document that will be extracted and included. Since processing instructions are ignored by validators and most other processes that don't expect to see them, they make an excellent tool for this purpose. For example, the following document uses <?begin-extract?> and <?end-extract?> processing instructions to select the checkmating move.

 <?xml version="1.0"?> <game> <move>f3</move> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required