Loading ...
Sorry, an error occurred while loading the content.

Doubt on XML-DBMS retrieve

Expand Messages
  • bhuvaneswari thirumoorthy
    hi, This is Bhuvaneswari from India. I have started working on XML-DBMS from the last week and I found it is very useful for retrieving things from the
    Message 1 of 1 , Apr 6, 2004
    • 0 Attachment
      This is Bhuvaneswari from India. I have started
      working on XML-DBMS from the last week and I found it
      is very useful for retrieving things from the existing

      I am now in need of some clarifications and will be
      very happy if I get the answers from you.

      1. I am using XML-DBMS Version 2.0 on Windows 2000 and
      JDK1.4 and SQL Server RDBMS.

      2. I have a database 'bsc' which consists of many
      tables. I want to access only one table
      'dir_organisation' and only one column of it, called

      3. I tried setting .map, .ftr, .act file like the


      <Actions Version="2.0"
      <!--Insert /-->
      <ElementType Name="org" />
      <ToColumn Name=object.name/>
      <!--Insert /-->

      <?xml version='1.0' ?>
      This sample filters uses a result set built over
      the dir_Organization
      table. It filters the Items table to return only
      the Org

      <FilterSet Version="2.0"
      <!--Namespace Prefix="sales" URI =
      "http://www.sales.org/" /-->
      <Wrapper Name="Project" />
      <!--ResultSetInfo Table="dir_organization"
      <Table Name="dir_organisation" />
      <Where Condition="1 = 1" />

      <?xml version='1.0' ?>
      This sample is roughly equivalent to the version
      1.0 sample
      sales.map. The only real differences are a few
      name changes.

      <XMLToDBMS Version="2.0"
      <SimpleDateFormat Pattern="MM.dd.yy"
      DefaultForTypes="DATE" />
      <Database Name="Default">
      <Table Name="dir_organisation">
      <Column Name="ORG_ID" DataType="FLOAT"
      <Column Name="ORG_NAME"
      DataType="VARCHAR" Length="255" Nullable="No"/>
      <Column Name="PARENT_ORG_ID"
      DataType="FLOAT" Nullable="Yes"/>
      <Column Name="ORG_MISSION"
      DataType="VARCHAR" Length="3000" Nullable="Yes"/>
      <Column Name="ORG_VISION"
      DataType="VARCHAR" Length="3000" Nullable="Yes"/>
      <Column Name="ORG_DESC"
      DataType="VARCHAR" Length="3000" Nullable="Yes"/>
      <Column Name="TOPBAR" DataType="VARCHAR"
      Length="100" Nullable="Yes"/>
      <Column Name="ORG_TICKER"
      DataType="VARCHAR" Length="3000" Nullable="Yes"/>
      <Column Name="ORG_INDEX"
      DataType="FLOAT" Nullable="No"/>
      <PrimaryKey KeyGenerator="Database">
      <UseColumn Name="ORG_ID"/>

      <ElementType Name="org"/>
      <ToClassTable Name="dir_organisation"/>
      <Attribute Name="UniqueID"/>
      <ToColumn Name="ORG_ID"/>
      <Attribute Name="ParentID"/>
      <ToColumn Name="PARENT_ORG_ID"/>
      <ElementType Name="object.name"/>
      <ToColumn Name="ORG_NAME"/>
      <ElementType Name="notes"/>
      <ToColumn Name="ORG_DESC"/>
      <ElementType Name="mission"/>
      <ToColumn Name="ORG_MISSION"/>
      <ElementType Name="vision"/>
      <ToColumn Name="ORG_VISION"/>
      <ElementType Name="ticker"/>
      <ToColumn Name="ORG_TICKER"/>
      <ElementType Name="index"/>
      <ToColumn Name="ORG_INDEX"/>

      And, after giving these, I found that I have to
      manually set the actions in 'actions.dtd', and I added
      the things there.

      <!ENTITY % actions "%p;None |
      %p;Insert |
      %p;SoftInsert |
      %p;Update |
      %p;UpdateOrInsert |
      %p;Delete |
      %p;Retrieve |
      <!ELEMENT %p;DefaultAction (%actions;)>
      <!ELEMENT %p;Action (%p;ElementType, (%actions;))>

      <!ELEMENT %p;None EMPTY>
      <!ELEMENT %p;Insert EMPTY>
      <!ELEMENT %p;SoftInsert EMPTY>
      <!ELEMENT %p;Update (%p;All |
      (%p;PCDATA?, (%p;ElementType |
      <!ELEMENT %p;UpdateOrInsert EMPTY>
      <!ELEMENT %p;Delete EMPTY>
      <!ELEMENT %p;Retrieve EMPTY>
      <!ELEMENT %p;SoftDelete EMPTY>

      And, I changed the coding in retrieveDocument method
      of DBMSToDOM class so as to use the 'Select' statement
      for getting the org_name from dir_organisation. I am
      getting the resultset correctly, and I have given this


      and I have called this method,

      return retrieveDocument(transferInfo, resultSets,
      filterSet, params, rootNode);

      But, when I am using the 'Select' statement, it gives
      the resultset correctly. But after calling
      retrieveDocument, 'doc' is returned as null.

      Can you guide me where I am wrong. Thanks in advance.


      "Vote;Pay Your Tax;Blame the Nation,Then."

      Do you Yahoo!?
      Yahoo! Small Business $15K Web Design Giveaway
    Your message has been successfully submitted and would be delivered to recipients shortly.