Home > Ask the SOA Experts > Data services Questions & Answers > XQuery examples
Ask The SOA Expert: Questions & Answers
EMAIL THIS

XQuery examples

Larry Fulton EXPERT RESPONSE FROM: Larry Fulton

Pose a Question
Other SOA Categories
Meet all SOA Experts
Become an Expert for this site


Enterprise IT tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 12 May 2008
Do you have any examples for when I should use XQuery and for when XQuery won't be able to meet my XML needs?

>
EXPERT RESPONSE

Some specific examples of what you need to do with XML would probably make it easier to provide an exact answer, but here is a general overview. You may be able to do everything you need with XQuery, and you should recognize that XQuery overlaps functionally with eXtensible Stylesheet Language Transformations (XSLT). Both languages include XPath syntax and structures. The best answer to your question is that there are places where XSLT is a stronger choice, for example if you want to make small changes to a document (for example, if you wanted to delete or modify every instance of a particular element type). Another example is writing code intended for use in different environments, where XSLT offers features that support things like dynamic binding.

XQuery is a more formal language and is probably easier to learn. In the absence of programming needs that are just not readily expressed in XQuery, you can most likely get away with XQuery.

From an architecture perspective, if you are going to use overlapping tools in an ongoing basis, my recommendation is always to establish a clear set of guidelines as to what you do with which tool, rather than letting this decision be made case-by-case based on the particular developer's skills, familiarity, or preferences. If you do let this happen on a case-by-case basis, you will in short order have a wide range of approaches in production, and this will in turn unnecessarily complicate your future maintenance efforts.


Sound Off! -   Be the first to post a message to Sound Off!


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Data services
Shedding multiple data representations
Data services for ESBs
Data services steps for a better SOA
Data abstraction best and worst practices
Do you need SDO if you use XQuery?
Data integration tips

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2001 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts