IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Simple Query

    Posted 07/11/03 03:01 AM

    My XML file begins like this

     
    <DVD_TITLE xmlns="http://www.dvd.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dvd.com
    C:\DOCUME~1\homecomp\Desktop\Database\xml\dvdtitles.xsd">
    <DVD>
    <DVD_Title>A.I. Artificial Intelligence</DVD_Title>
    <DVD_Release_Date>2002-03-05</DVD_Release_Date>
    <Studio>Universal Studios</Studio>
    <Rating>PG-13</Rating>
    <Region_Code>1</Region_Code>
    <Director>Steven Spielberg</Director>
    <Starring>Haley Joel Osment</Starring>
    <Starring> Jude Law</Starring>
    </DVD> 
    
    </pre><BR><BR>I am writing a simple query in QuipGui<BR><BR><pre class="ip-ubbcode-code-pre"> 
    <result>
    {
    for $x in document("dvdtitlesa.xml")/DVD_TITLE/DVD
    return 
    <output>
    { $x/Starring }
    </output>
    }
    </result> 



    I do not get any results but if I remove the attributes of the root element in the XML file i.e xmlns, xmlns:xsi etc the query works fine. Am I doing anything wrong?


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Simple Query

    Posted 07/15/03 10:21 AM

    If I am not mistaken you should make the query like this

      <result>
    {
    for $x in document("dvdtitlesa.xml"/DVD/DVD_TITLE
    return 
    <output>
    { $x/Starring }
    </output>
    }
    </result>


    You see you have DVD_TITLE before DVD in your query and that will not work when DVD_TITLE is inside the DVD tag and not vise versa


    #API-Management
    #webMethods
    #Tamino