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

-toDBMS mapping question

Expand Messages
  • nadeembc
    Please see example xml file below which i am trying to bring into DBMS tables. My problem is that there is too many nesting levels which don t make database
    Message 1 of 1 , Jan 7, 2002
    • 0 Attachment
      Please see example xml file below which i am trying to bring into
      DBMS tables.
      My problem is that there is too many nesting levels which don't make
      database sense. How do I make a map file which will deeal with the
      extra info. I am trying not to have to use XSL as it makes my program
      less generic. I will have to have a XSL file for each incoming XML
      file.

      <?xml version="1.0" encoding="iso-8859-1"?>
      <!DOCTYPE response SYSTEM "intacct_response.v2.1.dtd">
      <response>
      <control>
      <status>success</status>
      <senderid>bni</senderid>
      <controlid>sample_customers</controlid>
      <uniqueid>false</uniqueid>
      <dtdversion>2.1</dtdversion>
      </control>
      <operation>
      <authentication>
      <status>success</status>
      <userid>nadeem</userid>
      <companyid>BusinessNet</companyid>
      </authentication>
      <result>
      <status>success</status>
      <function>get_list</function>
      <controlid>f1</controlid>
      <listtype>vendor</listtype>
      <data>
      <vendor>
      <vendorid>201</vendorid>
      <name>PG & E</name>
      <parentid/>
      <termname>N15</termname>
      <glaccountno/>
      <accountlabel/>
      <vendtype/>
      <taxid/>
      <creditlimit/>
      <vendoraccountno/>
      <comments/>
      <status>active</status>
      <primary> // related table with
      vendorid primary key and contactname columns?
      // map primary to contact
      table
      <contactname>Gould,
      Jerry</contactname>
      </primary>
      <returnto>// related table with
      vendorid primary key and contactname columns?
      <contactname/>
      </returnto>
      <payto>// related table with vendorid
      primary key and contactname columns?
      <contactname/>
      </payto>
      <contactinfo> // how do we deal with
      this?
      <contact> // related table with
      contactname primary key and other columns?
      <contactname>Gould,
      Jerry</contactname>
      <printas>PG &
      E</printas>
      <companyname>PG &
      E</companyname>
      <prefix>Mr.</prefix>
      <firstname>Jerry</firstname>
      <lastname>Gould</lastname>
      <initial/>
      <phone1/>
      <phone2/>
      <cellphone/>
      <pager/>
      <fax/>
      <email1/>
      <email2/>
      <url1/>
      <url2/>
      <mailaddress>// related
      table with contactname primary key and other columns?
      <address1>P.O. Box
      247899</address1>
      <address2/>
      <city>San
      Francisco</city>
      <state>CA</state>
      <zip>94111</zip>
      <country>USA</country>
      </mailaddress>
      </contact>
      </contactinfo>// how do we deal with
      this?
      <contactlist> // how do we deal with
      this?
      <contactitem>// related table
      with contactname primary key
      // and other
      columns?
      <category>Primary
      Address</category>
      <contactname>Gould,
      Jerry</contactname>
      </contactitem>
      </contactlist>// how do we deal with
      this?
      </vendor>
      </data>
      </result>
      </operation>
      </response>


      Nadeem
    Your message has been successfully submitted and would be delivered to recipients shortly.