Whitespace Considerations

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

  -Brent Sheets, Site Editor


    Requires Free Membership to View

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 ( http://www.ora.com/catalog/orxmlapp/)

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.

This was first published in September 2000

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.