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

no data in database

Expand Messages
  • kavitha borra
    hi I am doing a convert from xml to DBMS.the map and the dec objects are created but I am not getting any data in the database.I am not getting any exceptions
    Message 1 of 9 , Sep 19, 2003
      hi
      I am doing a convert from xml to DBMS.the map and the
      dec objects are created but I am not getting any data
      in the database.I am not getting any exceptions too.
      This is the code I am using

      Connection conn = DriverManager.getConnection(DB_URL,
      DB_USERID, DB_PASSWORD);
      factory = new MapFactory_MapDocument(conn,new
      SAXParser());
      // Create a Map from sales.map. Map map =
      factory.createMap(new InputSource(new
      FileReader("sales1.map")));
      DOMParser parser;
      // Instantiate the parser and set various options.
      parser = new DOMParser();
      // Parse the input file
      parser.parse(new InputSource(new
      FileReader("form1.xml")));
      // Return the DOM tree
      Document doc = parser.getDocument();
      // Create a new DOMToDBMS object and store the data.
      domToDBMS = new DOMToDBMS(map);
      DocumentInfo docinfo = domToDBMS.storeDocument(doc);





      __________________________________
      Do you Yahoo!?
      Yahoo! SiteBuilder - Free, easy-to-use web site design software
      http://sitebuilder.yahoo.com
    • kavitha borra
      hi, I am still not able to get over the problem. I have created a sample data and tried to insert it. The database is oracle.The program is the same as below
      Message 2 of 9 , Sep 19, 2003
        hi,
        I am still not able to get over the problem.
        I have created a sample data and tried to insert it.
        The database is oracle.The program is the same as
        below except with form1.xml replaced with a.xml and
        sales1.map with a.map

        Thank you

        create table "a"("name" varchar2(5));

        a.Map file-----

        <?xml version="1.0" ?>
        <XMLToDBMS Version="1.0">
        <Options>
        <DateTimeFormats>
        <Patterns Timestamp="MM/dd/yy"/>
        </DateTimeFormats>
        </Options>
        <Maps>
        <IgnoreRoot>
        <ElementType Name="form4"/>
        </IgnoreRoot>
        <ClassMap>
        <ElementType Name="a"/>
        <ToClassTable>
        <Table Name="a"/>
        </ToClassTable>
        <PropertyMap>
        <Attribute Name="name"/>
        <ToColumn>
        <Column Name="name"/>
        </ToColumn>
        </PropertyMap>
        </ClassMap>
        </Maps>
        </XMLToDBMS>

        a.XML file--------

        <?xml version="1.0" encoding="UTF-8"?>
        <form4>
        <a>
        <name>kav</name>
        </a>
        </form4>

        --- kavitha borra <kavithamech@...> wrote:
        > hi
        > I am doing a convert from xml to DBMS.the map and
        > the
        > dec objects are created but I am not getting any
        > data
        > in the database.I am not getting any exceptions too.
        > This is the code I am using
        >
        > Connection conn =
        > DriverManager.getConnection(DB_URL,
        > DB_USERID, DB_PASSWORD);
        > factory = new MapFactory_MapDocument(conn,new
        > SAXParser());
        > // Create a Map from sales.map. Map map =
        > factory.createMap(new InputSource(new
        > FileReader("sales1.map")));
        > DOMParser parser;
        > // Instantiate the parser and set various options.
        > parser = new DOMParser();
        > // Parse the input file
        > parser.parse(new InputSource(new
        > FileReader("form1.xml")));
        > // Return the DOM tree
        > Document doc = parser.getDocument();
        > // Create a new DOMToDBMS object and store the
        > data.
        > domToDBMS = new DOMToDBMS(map);
        > DocumentInfo docinfo = domToDBMS.storeDocument(doc);
        >
        >
        >
        >
        >
        > __________________________________
        > Do you Yahoo!?
        > Yahoo! SiteBuilder - Free, easy-to-use web site
        > design software
        > http://sitebuilder.yahoo.com
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To post a message, send it to:
        > xml-dbms@yahoogroups.com
        > To unsubscribe, send a blank message to:
        > xml-dbms-unsubscribe@yahoogroups.com
        > Or join the newsgroup at:
        > news://news.barkto.com/homeless.xml.xml-dbms
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________
        Do you Yahoo!?
        Yahoo! SiteBuilder - Free, easy-to-use web site design software
        http://sitebuilder.yahoo.com
      • kavitha borra
        hi, can anybody please help me. I am not able to figure this problem out. Thank you ... __________________________________ Do you Yahoo!? Yahoo! SiteBuilder -
        Message 3 of 9 , Sep 22, 2003
          hi,
          can anybody please help me.
          I am not able to figure this problem out.


          Thank you
          --- kavitha borra <kavithamech@...> wrote:
          >
          > hi,
          > I am still not able to get over the problem.
          > I have created a sample data and tried to insert it.
          > The database is oracle.The program is the same as
          > below except with form1.xml replaced with a.xml and
          > sales1.map with a.map
          >
          > Thank you
          >
          > create table "a"("name" varchar2(5));
          >
          > a.Map file-----
          >
          > <?xml version="1.0" ?>
          > <XMLToDBMS Version="1.0">
          > <Options>
          > <DateTimeFormats>
          > <Patterns Timestamp="MM/dd/yy"/>
          > </DateTimeFormats>
          > </Options>
          > <Maps>
          > <IgnoreRoot>
          > <ElementType Name="form4"/>
          > </IgnoreRoot>
          > <ClassMap>
          > <ElementType Name="a"/>
          > <ToClassTable>
          > <Table Name="a"/>
          > </ToClassTable>
          > <PropertyMap>
          > <Attribute Name="name"/>
          > <ToColumn>
          > <Column Name="name"/>
          > </ToColumn>
          > </PropertyMap>
          > </ClassMap>
          > </Maps>
          > </XMLToDBMS>
          >
          > a.XML file--------
          >
          > <?xml version="1.0" encoding="UTF-8"?>
          > <form4>
          > <a>
          > <name>kav</name>
          > </a>
          > </form4>
          >
          > --- kavitha borra <kavithamech@...> wrote:
          > > hi
          > > I am doing a convert from xml to DBMS.the map and
          > > the
          > > dec objects are created but I am not getting any
          > > data
          > > in the database.I am not getting any exceptions
          > too.
          > > This is the code I am using
          > >
          > > Connection conn =
          > > DriverManager.getConnection(DB_URL,
          > > DB_USERID, DB_PASSWORD);
          > > factory = new MapFactory_MapDocument(conn,new
          > > SAXParser());
          > > // Create a Map from sales.map. Map map =
          > > factory.createMap(new InputSource(new
          > > FileReader("sales1.map")));
          > > DOMParser parser;
          > > // Instantiate the parser and set various options.
          > > parser = new DOMParser();
          > > // Parse the input file
          > > parser.parse(new InputSource(new
          > > FileReader("form1.xml")));
          > > // Return the DOM tree
          > > Document doc = parser.getDocument();
          > > // Create a new DOMToDBMS object and store the
          > > data.
          > > domToDBMS = new DOMToDBMS(map);
          > > DocumentInfo docinfo =
          > domToDBMS.storeDocument(doc);
          > >
          > >
          > >
          > >
          > >
          > > __________________________________
          > > Do you Yahoo!?
          > > Yahoo! SiteBuilder - Free, easy-to-use web site
          > > design software
          > > http://sitebuilder.yahoo.com
          > >
          > > ------------------------ Yahoo! Groups Sponsor
          > >
          > > To post a message, send it to:
          > > xml-dbms@yahoogroups.com
          > > To unsubscribe, send a blank message to:
          > > xml-dbms-unsubscribe@yahoogroups.com
          > > Or join the newsgroup at:
          > > news://news.barkto.com/homeless.xml.xml-dbms
          > >
          > > Your use of Yahoo! Groups is subject to
          > > http://docs.yahoo.com/info/terms/
          > >
          > >
          >
          >
          > __________________________________
          > Do you Yahoo!?
          > Yahoo! SiteBuilder - Free, easy-to-use web site
          > design software
          > http://sitebuilder.yahoo.com
          >
          > ------------------------ Yahoo! Groups Sponsor
          >
          > To post a message, send it to:
          > xml-dbms@yahoogroups.com
          > To unsubscribe, send a blank message to:
          > xml-dbms-unsubscribe@yahoogroups.com
          > Or join the newsgroup at:
          > news://news.barkto.com/homeless.xml.xml-dbms
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          >
          >


          __________________________________
          Do you Yahoo!?
          Yahoo! SiteBuilder - Free, easy-to-use web site design software
          http://sitebuilder.yahoo.com
        • Ronald Bourret
          Your problem is that you use an Attribute element in your map document instead of an ElementType element. This works if your XML document is:
          Message 4 of 9 , Sep 23, 2003
            Your problem is that you use an Attribute element in your map document
            instead of an ElementType element. This works if your XML document is:

            <?xml version="1.0" encoding="UTF-8"?>
            <form4>
            <a name="kav" />
            </form4>

            Your PropertyMap should be:

            <PropertyMap>
            <ElementType Name="name"/>
            <ToColumn>
            <Column Name="name"/>
            </ToColumn>
            </PropertyMap>

            -- Ron


            kavitha borra wrote:
            >
            > hi,
            > I am still not able to get over the problem.
            > I have created a sample data and tried to insert it.
            > The database is oracle.The program is the same as
            > below except with form1.xml replaced with a.xml and
            > sales1.map with a.map
            >
            > Thank you
            >
            > create table "a"("name" varchar2(5));
            >
            > a.Map file-----
            >
            > <?xml version="1.0" ?>
            > <XMLToDBMS Version="1.0">
            > <Options>
            > <DateTimeFormats>
            > <Patterns Timestamp="MM/dd/yy"/>
            > </DateTimeFormats>
            > </Options>
            > <Maps>
            > <IgnoreRoot>
            > <ElementType Name="form4"/>
            > </IgnoreRoot>
            > <ClassMap>
            > <ElementType Name="a"/>
            > <ToClassTable>
            > <Table Name="a"/>
            > </ToClassTable>
            > <PropertyMap>
            > <Attribute Name="name"/>
            > <ToColumn>
            > <Column Name="name"/>
            > </ToColumn>
            > </PropertyMap>
            > </ClassMap>
            > </Maps>
            > </XMLToDBMS>
            >
            > a.XML file--------
            >
            > <?xml version="1.0" encoding="UTF-8"?>
            > <form4>
            > <a>
            > <name>kav</name>
            > </a>
            > </form4>
          • kavitha borra
            thank you for your response I changed the propertyMap to ... but still I dont seem to get any data in the database can you please help me ...
            Message 5 of 9 , Sep 25, 2003
              thank you for your response
              I changed the propertyMap to

              <PropertyMap>
              > <ElementType Name="name"/>
              > <ToColumn>
              > <Column Name="name"/>
              > </ToColumn>
              > </PropertyMap>
              >

              but still I dont seem to get any data in the database

              can you please help me

              --- Ronald Bourret <rpbourret@...> wrote:
              > Your problem is that you use an Attribute element in
              > your map document
              > instead of an ElementType element. This works if
              > your XML document is:
              >
              > <?xml version="1.0" encoding="UTF-8"?>
              > <form4>
              > <a name="kav" />
              > </form4>
              >
              > Your PropertyMap should be:
              >
              > <PropertyMap>
              > <ElementType Name="name"/>
              > <ToColumn>
              > <Column Name="name"/>
              > </ToColumn>
              > </PropertyMap>
              >
              > -- Ron
              >
              >
              > kavitha borra wrote:
              > >
              > > hi,
              > > I am still not able to get over the problem.
              > > I have created a sample data and tried to insert
              > it.
              > > The database is oracle.The program is the same as
              > > below except with form1.xml replaced with a.xml
              > and
              > > sales1.map with a.map
              > >
              > > Thank you
              > >
              > > create table "a"("name" varchar2(5));
              > >
              > > a.Map file-----
              > >
              > > <?xml version="1.0" ?>
              > > <XMLToDBMS Version="1.0">
              > > <Options>
              > > <DateTimeFormats>
              > > <Patterns Timestamp="MM/dd/yy"/>
              > > </DateTimeFormats>
              > > </Options>
              > > <Maps>
              > > <IgnoreRoot>
              > > <ElementType Name="form4"/>
              > > </IgnoreRoot>
              > > <ClassMap>
              > > <ElementType Name="a"/>
              > > <ToClassTable>
              > > <Table Name="a"/>
              > > </ToClassTable>
              > > <PropertyMap>
              > > <Attribute Name="name"/>
              > > <ToColumn>
              > > <Column Name="name"/>
              > > </ToColumn>
              > > </PropertyMap>
              > > </ClassMap>
              > > </Maps>
              > > </XMLToDBMS>
              > >
              > > a.XML file--------
              > >
              > > <?xml version="1.0" encoding="UTF-8"?>
              > > <form4>
              > > <a>
              > > <name>kav</name>
              > > </a>
              > > </form4>
              >
              > ------------------------ Yahoo! Groups Sponsor
              >
              > To post a message, send it to:
              > xml-dbms@yahoogroups.com
              > To unsubscribe, send a blank message to:
              > xml-dbms-unsubscribe@yahoogroups.com
              > Or join the newsgroup at:
              > news://news.barkto.com/homeless.xml.xml-dbms
              >
              > Your use of Yahoo! Groups is subject to
              > http://docs.yahoo.com/info/terms/
              >
              >


              __________________________________
              Do you Yahoo!?
              The New Yahoo! Shopping - with improved product search
              http://shopping.yahoo.com
            • Deepa Shankar
              HI Even I am in same situation. Its not updating database at all. kavitha borra wrote: thank you for your response I changed the
              Message 6 of 9 , Sep 25, 2003
                HI
                Even I am in same situation. Its not updating database at all.


                kavitha borra <kavithamech@...> wrote:
                thank you for your response
                I changed the propertyMap to

                <PropertyMap>
                > <ElementType Name="name"/>
                > <ToColumn>
                > <Column Name="name"/>
                > </ToColumn>
                > </PropertyMap>
                >

                but still I dont seem to get any data in the database

                can you please help me

                --- Ronald Bourret <rpbourret@...> wrote:
                > Your problem is that you use an Attribute element in
                > your map document
                > instead of an ElementType element. This works if
                > your XML document is:
                >
                > <?xml version="1.0" encoding="UTF-8"?>
                > <form4>
                > <a name="kav" />
                > </form4>
                >
                > Your PropertyMap should be:
                >
                > <PropertyMap>
                > <ElementType Name="name"/>
                > <ToColumn>
                > <Column Name="name"/>
                > </ToColumn>
                > </PropertyMap>
                >
                > -- Ron
                >
                >
                > kavitha borra wrote:
                > >
                > > hi,
                > > I am still not able to get over the problem.
                > > I have created a sample data and tried to insert
                > it.
                > > The database is oracle.The program is the same as
                > > below except with form1.xml replaced with a.xml
                > and
                > > sales1.map with a.map
                > >
                > > Thank you
                > >
                > > create table "a"("name" varchar2(5));
                > >
                > > a.Map file-----
                > >
                > > <?xml version="1.0" ?>
                > > <XMLToDBMS Version="1.0">
                > > <Options>
                > > <DateTimeFormats>
                > > <Patterns Timestamp="MM/dd/yy"/>
                > > </DateTimeFormats>
                > > </Options>
                > > <Maps>
                > > <IgnoreRoot>
                > > <ElementType Name="form4"/>
                > > </IgnoreRoot>
                > > <ClassMap>
                > > <ElementType Name="a"/>
                > > <ToClassTable>
                > > <Table Name="a"/>
                > > </ToClassTable>
                > > <PropertyMap>
                > > <Attribute Name="name"/>
                > > <ToColumn>
                > > <Column Name="name"/>
                > > </ToColumn>
                > > </PropertyMap>
                > > </ClassMap>
                > > </Maps>
                > > </XMLToDBMS>
                > >
                > > a.XML file--------
                > >
                > > <?xml version="1.0" encoding="UTF-8"?>
                > > <form4>
                > > <a>
                > > <name>kav</name>
                > > </a>
                > > </form4>
                >
                > ------------------------ Yahoo! Groups Sponsor
                >
                > To post a message, send it to:
                > xml-dbms@yahoogroups.com
                > To unsubscribe, send a blank message to:
                > xml-dbms-unsubscribe@yahoogroups.com
                > Or join the newsgroup at:
                > news://news.barkto.com/homeless.xml.xml-dbms
                >
                > Your use of Yahoo! Groups is subject to
                > http://docs.yahoo.com/info/terms/
                >
                >


                __________________________________
                Do you Yahoo!?
                The New Yahoo! Shopping - with improved product search
                http://shopping.yahoo.com

                Yahoo! Groups SponsorADVERTISEMENT

                To post a message, send it to: xml-dbms@yahoogroups.com
                To unsubscribe, send a blank message to: xml-dbms-unsubscribe@yahoogroups.com
                Or join the newsgroup at: news://news.barkto.com/homeless.xml.xml-dbms

                Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


                ---------------------------------
                Do you Yahoo!?
                The New Yahoo! Shopping - with improved product search

                [Non-text portions of this message have been removed]
              • Ronald Bourret
                You also need to change your IgnoreRoot element to:
                Message 7 of 9 , Sep 29, 2003
                  You also need to change your IgnoreRoot element to:

                  <IgnoreRoot>
                  <ElementType Name="form4"/>
                  <PseudoRoot>
                  <ElementType Name="a"/>
                  <CandidateKey Generate="No">
                  <Column Name="name"/> <
                  </CandidateKey>
                  </PseudoRoot>
                  </IgnoreRoot>

                  Does XML-DBMS return any error messages? If so, what are they?

                  -- Ron


                  kavitha borra wrote:
                  >
                  > thank you for your response
                  > I changed the propertyMap to
                  >
                  > <PropertyMap>
                  > > <ElementType Name="name"/>
                  > > <ToColumn>
                  > > <Column Name="name"/>
                  > > </ToColumn>
                  > > </PropertyMap>
                  > >
                  >
                  > but still I dont seem to get any data in the database
                • Leonardo G Chaves
                  How could I use data types for DTDs (www.w3.org/TR/dt4dtd ) with xmldbms ? Regards,Leonardo
                  Message 8 of 9 , Sep 29, 2003
                    How could I use data types for DTDs (www.w3.org/TR/dt4dtd ) with xmldbms ?
                    Regards,Leonardo
                  • Ronald Bourret
                    1) Modify org.xmlmiddleware.schemas.dtds.ElementType and Attribute so that both include a dataType field. 2) Add a DataTypes class that contains constants
                    Message 9 of 9 , Sep 30, 2003
                      1) Modify org.xmlmiddleware.schemas.dtds.ElementType and Attribute so
                      that both include a dataType field.

                      2) Add a DataTypes class that contains constants (static fixed ints) for
                      all of the data types in XML Schemas.

                      3) Modify org.xmlmiddleware.schemas.dtds.DTDParser to recognize the
                      e-dtype and a-dtype attribute declarations and set the data types in the
                      ElementType and Attribute classes. The DTD parser should only recognize
                      the XML Schema data types. (This will be the only difficult code to
                      write. The DTD parser is not the easiest code to understand...)

                      4) Modify MapFactory_DTD to set the data type on Column objects based on
                      the data type in ElementType and Attribute objects. You will need to
                      decide on how XML Schema data types are mapped to SQL data types, but
                      this shouldn't be too hard.

                      5) If you do this, it would be great if you could donate the code back
                      to the project. I think this would be very useful.

                      -- Ron

                      Leonardo G Chaves wrote:
                      >
                      > How could I use data types for DTDs (www.w3.org/TR/dt4dtd ) with xmldbms ?
                      > Regards,Leonardo
                    Your message has been successfully submitted and would be delivered to recipients shortly.