Manage Learn to apply best practices and optimize your operations.

Whitespace Considerations

Steve Muench, author of the soon-to-be-released "Building Oracle XML Applications" to be published by O'Reilly & Associates, Inc. ( provides us with a tip concerning WS nodes.

  -Brent Sheets, Site Editor


Remember that an XML document can look like this:

    <ROW num="1">

or it can look like this:

  <ROWSET><ROW num="1"><X>Y</X></ROW></ROWSET>

NOTE: While both expressions contain a logically equivalent element structure, the former example contains additional whitespace to give it that indented look. Specifically, it contains a carriage return at the end of every line followed by a series of spaces at the start of the next line. When considering an XML document as a tree of nodes, don't forget that the text nodes containing whitespace also count as nodes the same as text like 7788 or SCOTT. Since you can't see it, whitespace is easy to forget about.


Read a sample beta chapter from "Building Oracle XML Applications" by Steve Muench, by visiting O'Reilly & Associates, here (

Steve Muench is Oracle's lead XML Technical Evangelist and development lead for Oracle XSQL Pages. He is Oracle's primary representative to the W3C XSL Working Group, as well as a consulting product manager and developer working on Oracle Business Components for Java--an XML-based business object framework. In his more than ten years at Oracle, Steve's been involved in the support, development, and technical evangelism of Oracle's application development tools and database, and is a frequent presenter at both Oracle and XML technical conferences.

Dig Deeper on Topics Archive

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.