Generating mixed case columns for XML using Object views

I am trying to model a query involving joins to generate hierarchical levels for XML document. I model it with an object view with a multicast subquery and the generated XML works fine except the following :
The generated XML creates a tag <view_column_name>_ITEM for the nested multicase subquery columns in the view and all the nested subquery view columns in upper case because the underlying table columns are in upper case. To better illustrate, please see the following example :
CREATE TYPE Tillinstance_t as object (
"Tillinstanceid" number
,"Stationid" number
,"Comment" varchar2(2000)
,"DepositID" number(38)
,"TimestampCreate" date
,"UseridCreate" number
,"TimestampChange" date
,"UseridChange" number
,"TimestampClosed" date
,"UseridClosed" number
,"TimestampBalance" date
,"UserIDBalance" number )
create type insts as table of Tillinstance_t ;
CREATE OR REPLACE VIEW till_view AS
SELECT t.tillid as "TillID"
, t.description as "Descr"
, t.word as "Word"
, t.Scopetypeid as "ScopeTypeId"
, t.displayOrder as "DisplayOrder"
, t.useridcreate as "UserIDCreate"
, t.newid as "NewID"
, t.flagactive as "FlagActive"
, t.timestampcreate as "TSCR"
, t.useridcreate as "UIDCR"
, t.timestampchange as "TSCH"
, t.useridchange as "UIDCH"
, CAST( MULTISET ( SELECT i.Tillinstanceid as "TillinstanceID"
, i.stationid as "StationID"
, i.ocomment as "Comment"
, i.depositid as "DepositID"
, i.Timestampcreate as "TSCR"
, i.useridcreate as "UIDCR"
, i.Timestampchange as "TSCH"
, i.useridchange as "UIDCH"
, i.timestampclosed as "TSCL"
, i.useridclosed as "UIDCL"
, i.timestampbalance as "TSBAL"
, i.useridbalance as "UIDBAL"
FROM TillInstance i
WHERE t.tillid = i.tillid)
AS Insts)
AS "Insts"
FROM ucTill t
The generated XML shows up in the form of :
<?xml version = '1.0'?>
<Tills>
<Till TillID="1002" Descr="Till #3" Word="Till3" ScopeTypeId="8"
DisplayOrder="0" UserIDCreate="296" TSCR="3/26/2001 0:0:0" UIDCR="296"
TSCH="5/4/2001 14:12:32" UIDCH="298">
<Insts>
<Insts_ITEM TILLINSTANCEID="1278" STATIONID="1057" OCOMMENT="Morning Till3"
TIMESTAMPCREATE="3/26/2001 0:0:0" USERIDCREATE="296" TIMESTAMPCHANGE="6/7/2001
8:26:49" USERIDCHANGE="99" TIMESTAMPCLOSED="6/7/2001 8:26:49"
USERIDCLOSED="99"/>
<Insts_ITEM TILLINSTANCEID="1362" STATIONID="1057" TIMESTAMPCREATE="6/7/2001
8:27:13" USERIDCREATE="99" TIMESTAMPCHANGE="6/11/2001 11:32:58"
USERIDCHANGE="320"/>
</Insts>
</Till>
</Tills>
Now How do I stripe out the _ITEM from the generated XML and change the columns TIMESTAMPCREATE, USERIDCLOSED etc to mixed case?
Any idea

I could generate the mixed case columns with no problem. It was my mistake and sorry for the inconvinience.
However I am running into problems modelling a nested hierarchical set of queries with levels more than 2.
Please advise of any sample code available anywhere.
For example I could do :
create table x1 ( id number , f1 varchar2(10));
creat table x2 ( id number , id_x1 number references x1(id) , f1 varchar2(10)) ;
create table x3 ( id number , id_x2 number references x2(id), f1 varchar2(10)) ;
To model this, I did
create type x3_typ as object ( id number, id_x2 number , f1 varchar2(10)) ;
create type x3_typ_t is table of x3_typ ;
create type x2_typ as object ( id number, id_x1 number , f1 varchar2(10), x3_list x3_typ_t ) ;
create type x2_typ_t is table of ref x2_typ ;
create type x1_typ as object ( id number
, f1 varchar2(10) , x2_list x2_typ_t ) ;
create or replace view x3_x2 as
select id , f1 , cast(multiset(select * from x3 ) as x3_typ_t ) as x3_list
If I try to use a view again like as given below, I get the Oracle inconsistent datatypes error.
create or replace view x2_x1 as
select id , f1 , cast(multiset(select * from x3_x2 ) as x2_typ_t ) as x2_list
I there a better way? Am I missing something? Please help.

Similar Messages

  • Columns for XML gallery

    Hi! I'm nearly there but I can't get this scipt to work!! Its
    a basic gallery I'm building that imports images via xml with
    thumnails. Problem is I started trying to make columns and it wont
    work! I'm nearly there though I can smell it! The Column bit is
    declaired at the top and in a for statement at the bottom! Can you
    take a look?
    Thanks Gavin

    I could generate the mixed case columns with no problem. It was my mistake and sorry for the inconvinience.
    However I am running into problems modelling a nested hierarchical set of queries with levels more than 2.
    Please advise of any sample code available anywhere.
    For example I could do :
    create table x1 ( id number , f1 varchar2(10));
    creat table x2 ( id number , id_x1 number references x1(id) , f1 varchar2(10)) ;
    create table x3 ( id number , id_x2 number references x2(id), f1 varchar2(10)) ;
    To model this, I did
    create type x3_typ as object ( id number, id_x2 number , f1 varchar2(10)) ;
    create type x3_typ_t is table of x3_typ ;
    create type x2_typ as object ( id number, id_x1 number , f1 varchar2(10), x3_list x3_typ_t ) ;
    create type x2_typ_t is table of ref x2_typ ;
    create type x1_typ as object ( id number
    , f1 varchar2(10) , x2_list x2_typ_t ) ;
    create or replace view x3_x2 as
    select id , f1 , cast(multiset(select * from x3 ) as x3_typ_t ) as x3_list
    If I try to use a view again like as given below, I get the Oracle inconsistent datatypes error.
    create or replace view x2_x1 as
    select id , f1 , cast(multiset(select * from x3_x2 ) as x2_typ_t ) as x2_list
    I there a better way? Am I missing something? Please help.

  • Mixed Case tags in XML

    Is it possible to return mixed case tag names in the XML from Oracle? We are using mixed case column and table names in our database and have a requirement to produce the XML output in mixed case too.

    What kind of mixed case you want? Currently it works for me.
    Here is how to create a table with column name to be case-sensitive:
    drop table jinyu_test;
    create table jinyu_test
    "Jinyu" number,
    "ContentManage" varchar2(400)
    insert into jinyu_test values(1,'Try this 01');
    insert into jinyu_test values(2,'Try this 02');
    Here is the result we get using DBMS_XMLQuery:
    | <?xml version = '1.0'?>
    | <ROWSET>
    | <ROW num="1">
    | <Jinyu>1</Jinyu>
    | <ContentManage>Try this 01</ContentManage>
    | </ROW>
    | <ROW num="2">
    | <Jinyu>2</Jinyu>
    | <ContentManage>Try this 02</ContentManage>
    | </ROW>
    | </ROWSET>
    You can see the tag corresponding to the column name is case-sensitive.

  • Generating mixed case for table and column names

    I trying to get table definition from Oracle 9i database into my toplink workbench
    (version 9.0.3), the column names and table names are capitilized by
    default, how do I change this to be mixed case? Thanks

    I'm not sure why you want them changed. The Oracle database by default is case insensitive, which in essence means it converts everything to upper case when a case is not specified (which can be done by wrapping it in quotes). Unfortunately, Java strings are case sensitive. This means that if you try searching resultsets for "TableName" when the database driver is returning "TABLENAME", you will run into problems. It is probably better to have your project match your database as closely as possible to avoid any issues later on.
    That said, I don't know of a way to automatically have the workbench use mixed case names - it uses the strings as they are returned from the database. I believe you will need to manually change the table names if you want them to be different than what you have imported.
    Best Regards,
    Chris

  • Generate lower-case nodes in XML

    Hi,
    In my PL/SQL procedures, I generate XML files based on SQL queries, like this:
    SELECT XMLELEMENT ("web_vpreparations",
    XMLAGG(
    XMLELEMENT ("web_vpreparation",
    XMLFOREST (CODE as "code",
    COMMERCIAL_NAME as "commercial_name",
    As you can see, I rename my column names to their lower-case equivalents, because the client-side application which processes the XML file expects them to be in lower-case.
    I now have a huge view with hundreds of columns and would like to avoid having to rename each one. Is there a chance I can tell the PL/SQL or the SQL to return the XML nodes in lower-case?
    I'll appreciate any help on this problem.
    Chris.

    does XMLTable exist in Oracle 9i, for some of my customers?No. XMLTable was introduced in 10g (not sure the exact version though).
    What am I doing wrong?Sorry can't say. I know for sure that it works for 10.2.0.4.0:
    SQL> select * from v$version where rownum = 1
    BANNER                                                         
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    1 row selected.
    SQL> select trim(column_value) cv
    from xmltable(
    'for $i in ora:view("hersteller_x")/ROW[HERSTL=1]/* return element {lower-case($i/name())} {$i/text()}')
    CV                                                                             
    <mandant>1</mandant>                                                           
    <herstl>1</herstl>                                                             
    <kurzbez>01FSL</kurzbez>                                                       
    <name>SEMICONDUCTOR INC.</name>                                      
    <versland>D</versland>                                                         
    <urland>US</urland>                                                            
    <versweg>4</versweg>                                                           
    7 rows selected.

  • Problem inserting XML into object view

    Hi all,
    My environment is :
    Windows NT 4.0
    Oracle 8i 8.1.5
    (NLS_CHARACTERSET = EL8MSWIN1253)
    Apache 1.3.11 Web Server
    Apache JServ 1.1
    XSQL v 0.9.9.1 and XML parser for Java v2,
    XMLSQL that come with it
    I've created an object view as following :
    create table schedules (
    schedule_id varchar2(20),
    description varchar2(100),
    constraint pk_schedule_id primary key (schedule_id)
    create table schedule_details (
    schedule_id varchar2(20),
    starting_time date,
    duration number,
    constraint pk_schedule_dtls primary key (schedule_id, starting_time),
    constraint fk_schedule_id foreign key (schedule_id) references schedules (schedule_id)
    create or replace type schedule_detail_t as object (
    starting_time varchar2(20),
    duration number
    create or replace type schedule_detail_list as table of schedule_detail_t;
    create or replace type schedule_details_t as object (
    schedule_id varchar2(20),
    description varchar2(100),
    details schedule_detail_list
    create or replace view schedule_details_view of schedule_details_t
    with object OID (schedule_id)
    as select schedule_id, description,
    cast(multiset(select schedule_detail_t (to_char(starting_time, 'hh24:mi'), duration) as Detail
    from schedule_details
    where schedule_details.schedule_id = schedules.schedule_id
    ) as schedule_detail_list )
    from schedules;
    And I'm trying to insert using putXML this
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <ROWSET>
    <ROW>
    <SCHEDULE_ID>S1112</SCHEDULE_ID>
    <DESCRIPTION>Working 08:00 to 20:00</DESCRIPTION>
    <DETAILS>
    <DETAILS_ITEM>
    <STARTING_TIME>08:00</STARTING_TIME>
    <DURATION>12</DURATION>
    </DETAILS_ITEM>
    </DETAILS>
    </ROW>
    </ROWSET>
    The error I get is
    oracle.xml.sql.OracleSQLXMLException:
    non supported oracle-character-set-174
    Note: no rows have been inserted
    at oracle.xml.sql.dml.OracleXMLSave.insertXML
    When I'm posting using XSQL the XML doesn't get inserted with no error message.
    But when I try this for a change
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <ROWSET>
    <ROW>
    <SCHEDULE_ID>S1111</SCHEDULE_ID>
    <DESCRIPTION>Working 08:00 to 20:00</DESCRIPTION>
    </ROW>
    </ROWSET>
    Trying to insert into table (this time) "schedules" using putXML it works ...
    It works on tables and it doesn't work on object views.
    Any piece of advice will be highly appreciated.
    Nick

    No known limitations. Please post the sample DDL to create your object types and object view, along with an example of the example XML document you're trying to insert.

  • How to generate gdb compatible .o for CMT using Sun Studio C compiler?

    Hello,
    we've been working on a joint project for telco bearer plane applications on CMT.
    We started the project using gcc for Sparc and we switched to Sun Studio compiler when we hit some bugs in gcc (optimized mode was not completely stable). The switch took a few weeks due to syntax differences and toolchain option changes.
    With Sun Studio we got a double digit percent performance improvement, so Sun Studio proved more stable and faster than gcc.
    To debug programs we require gdb, because the Telco customers are more familiar with it. The problem is that Sun Studio generates object files which are not compatible with gdb.
    Our main requirement is to be able to generate gdb compatible object files using Sun Studio compiler.
    We checked this link:
    http://cooltools.sunsource.net/gcc/ReleaseNotes.html
    but this seems to be a variant of gcc. At this point we cannot switch compiler because of the performance and stability issues mentioned above and because it will take a few weeks to months to switch.
    We have two questions:
    1) Is there a way to generate gdb compatible object files using Sun Studio 11?
    2) If not, is this funcionality going to be available in a future release of Sun Studio and what is the time frame?
    Thanks for your help.
    Marco Zandonadi
    Teja Technologies

    The undefined symbol is in the C++ runtime support library that is part of Solaris. Probably you have an out-fo-date version of the libraries.
    You can get current patches from the Sun Studio patch page:
    http://developers.sun.com/prodtech/cc/downloads/patches/index.html
    From the page for your version of WorkShop or Sun Studio, select the C++ Runtime Library patch for the version of Solaris that your are running. While you are at it, you can get the current compiler patches as well.
    If patching the runtime libraries does not fix the problem, let me know, and also show the exact command lines that you use for compiling and linking the program.

  • Case Studies for EJB Use

    I am in the process of recommending J2EE/Weblogic as an architecture to a client,
    but they have pushed back in wanting to know of successful deployments, and specifically
    about the success of companies using EJB's instead of a simple Servlet approach.
    Does anyone out there know of some good resources for case studies of companies deploying
    J2EE/EJB's?

    The question is: How complex and how transactional is the application? A
    simple or a non-transactional application should probably be build without
    EJBs.
    In an enterprise where you have many apps built from shared components, EJBs
    make sense too.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Jason White" <[email protected]> wrote in message
    news:3ce93a5f$[email protected]..
    >
    I am in the process of recommending J2EE/Weblogic as an architecture to aclient,
    but they have pushed back in wanting to know of successful deployments,and specifically
    about the success of companies using EJB's instead of a simple Servletapproach.
    >
    Does anyone out there know of some good resources for case studies ofcompanies deploying
    J2EE/EJB's?

  • Online Database updation for SQLite using Objective-C Language

    Hello Experts,
    I would like to know if executing scripts (or any apple script) inside apple script possible? I need to have my application to fetch some script from the database field, (like stored procedure) I do not want to compile the application with the formula changes every time, I would just specify this in the database and I will prefer to have a script read that formula and execute.
    I am looking for something like exec("c=a+b") will get the values for a and b in the scope of the script and assign that to c. Still c will be accessible in the subsequent script lines.
    I hope this explains my situation, please advise.
    Thank you.
    NalaN

    I thought I answered this in your other thread. But over there you were doing it from Objective-C.
    http://discussions.apple.com/thread.jspa?threadID=1899808&tstart=0
    You've confused me though. Your topic title says Objective-C, but your post says Applescript?
    Anyway, if you're not married to the Objective-C and piping it off to an interpreter doesn't work for you then do the entire thing in Python or another interpreted language. For example, in Python.
    a = 2
    mystring = "b = a + 1"
    exec(mystring)
    print b
    As Orange pointed out the security risks are huge.
    Eric

  • Enable radiobuttons using object view

    hi, I'm making a desktop application in JDeveloper 11g adf swing, I have a method that allows me to print the rows of a view object in console ...
    This is the method,
    public void DatosPAcientesS_EC() {
    ViewObject vo = getDatosPacientes1(); //instanciar objeto de view object
    // Crea iterador de un conjunto de filas con el sistema de nombre
    RowSetIterator iter = vo.createRowSetIterator(null);
    while (iter.hasNext()) {
    Row r = iter.next();
    sexo=r.getAttribute("Sexo").toString();
    EstCivil=r.getAttribute("EstadoCivil").toString();
    System.out.println("SEXO: "+sexo);
    System.out.println("Estado Civil: "+EstCivil);
    // cerrar la fila del interactor del conjunto
    iter.closeRowSetIterator();
    is in the appmoduleimpl, here is the question how I can activate a radiobutton according to the "sex" or "Status", with data back to me the view object, or is there some other method I can do to change radio buttons from the view object.
    I am new to JDeveloper and know how to do this .. thanks

    in ADF BC , you generally specify the Radio Group in the UI Hints -> Default List Type after configuring a LOV for an attribute.
    Btw on a side note - see this post on ADF Swing - https://forums.oracle.com/forums/ann.jspa?annID=1617

  • Mixed case parsing using DBMS_XMLquery

    I have created a view using mixed case column names. However, when I use DBMS_XMLquery to pass the select "column_name" from table_name, it does not parse and does not work. However it works fine with passing 'select * from table_name'. Any idea how a mixed case column can be passed to dbms_xmlquery? Or any idea how a mixed case column name is passed in dynamic sql queries.

    I found the problem. It was not with mixed case column names. Rather it was because of the NULL value returns from the sql query which the java procedure for transforming sql was not able to trap and throwing out exception.
    However, still it is quite funny. If I use all the columns in the query or do select * , I get back the generated XML. If I just select a few columns, I get the error message
    ORA-29532: Java call terminated by uncaught java exception (java.lang.NullPointerException
    ORA-06512: at "SYS.DBMS_XMLQUERY" line 206
    Any idea
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    Would you send the test case you are using for reproducing the problem?<HR></BLOCKQUOTE>
    null

  • Creating a new Column for my list Versus adding it from existing site columns, when to use each approach

    I have created a new issue tracking list inside SharePoint 2013 team site. And it comes with predefined columns, some of them are useful while the other are not . Can anyone help me in figuring out the following:-
    The list come with a field named “Assigned To”, while in my case I want a column named “Approver”. So what is preferred , to re-name the “Assumed to ”column to “Approver”, or create new field name “Approver”.?.
    If I rename an existing column, could this be overridden in any future updates for my SharePoint server?
    Now we want to add a column named “Office location”.so I need to create a new field for this. But seems there are two ways to do so either to add a new Site Column at the site level and then assign it to the list as follow :- 
    , or to directly adding a column to the list, even if it is not available in the site columns , as follow:-
    So what are the differences between the two approaches ? .if I am not wrong defining a site column will allow me to re-use it in another list , but defining the column at the list level, will allow me to add a column even if it is already defined as site
    column.
    So can anyone advice on my three questions please? Thanks

    1) 'Assigned to' has a different meaning then 'Approver' , it will be better if you create a new field for 'Approver'. Assigned to is a Site Column which has managed property for search, so it will be confusing type of data it will return from search in
    future. 
    2) Any rename of fields should not / and will not get modified in SharePoint updates. So, you can rename is without any issue since the internal name will remain the same. But its always better to create your own custom column for business use.
    3) Creating a site column or not depends upon your need, If you create a Site Column - in whole site collection you will be able to add this field in any list - It will be crawled, SharePoint will automatically provide managed property for site column and
    you will be able to get this value via search. These things will not be present in list column, you will need to do specific settings in case its required.
    If these things are needed then you can go for Site Column, usually its good to create a Site Column and use it.
    For Site Columns you can check following links 
    Introduction to Columns
    From site column to managed property - What's up with that?
    Create a site column
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.
    thanks a lot for your reply it is really helpful. so as i understand that using site columns will be better in most cases, and there is not any specific reason for not using it? is this right ?
    Second question, do u mean that if i have a list column named "Serial number", then this column will not be searched ? For example if i have serial number such as "12345" and i try searching this text "12345" i will not get
    the item in my search ?
    Thanks

  • Mixed case table/col names and JDeveloper?

    I am thinking of trying to use mixed case table/column names in my Oracle 8i database.
    My hope is to achieve table/column names consistent with Java conventions (which I am happy with).
    Would this work with Jdeveloper 3.1? 3.2?
    Will JDeveloper/BC4J then generate mixed case names?
    Will I cause my self lots of pain and suffering? (I don't consider having to enter a correct mixed case name a pain; I do consider always having to quote it and/or use TOUPPER, etc. a bit of pain)
    Thanks
    R.Parr
    Temporal Arts
    null

    I do consider always having to quote it and/or use TOUPPER, etc. a bit of pain)<<<JDEV isn't as much the issue. If you have simple applications and don't intend to change things over time, or create lots of interfaces, or support multiple development tools against the same database, mixed cases seem to work fine.
    To give yourself an idea of how cumbersome things will be, go in and
    create "myTable" ( "myField" varchar2(20) );
    now DESC ribe the table,
    select myField from it.
    Putting doublequotes around things all the time gets very irritating. Remember it is also for having special characters and embedded spaces... and I don't know of any PL/SQL SET ( other than the opposite: SQLCASE that forces just about everything to uppercase ).
    Oh, and then you get to encounter fun things like ODBC and JDBC drivers that may or may not like it. Or if you MOVE/EXPORT the data around, your target may or may not be happy.
    Working at several diversified, large organization with MANY database products/targets, I've become very disenchanted with making mixed case attributes and table names!
    All tools should support mixed case correctly. Reality has returned a mixed case of results. grin or not, as the case may be.
    null

  • RE: Converting to mixed case.

    >
    I recall seeing a method that would convert all upper or all lower case to
    mixed case. Does this sound familiar to anyone?
    Hello Everyone
    I've developed a single Domain Class to support this behavior. With this
    Domain Class you can choice to convert to mixed case each word of the
    text or only the initial word and the word after a period by setting the
    value of the ToUpdateEachWord attribute (boolean).
    Here is an example of this domain class.
    I hope this help you.
    Victor Navarro
    [email protected]

    we have a database which I want to use as the source for generating a Java API, and I need/want the Java classes and attributes to be (automatically) created with mixed case names. At the same time we have existing applications and scripts that access the database, and these assume case insensitive table and column names.Not sure if I got you right, but how about creating views as e.g in
    SQL> create or replace view "Dept"
      2  as
      3     select deptno "Deptno", dname "Dname", loc "Loc" from dept
      4  /
    View created.This will allow you to continue to query in case insensitive manner as well as case sensitive:
    SQL>
    SQL> select * from dept
      2  /
             DEPTNO DNAME          LOC
                 10 ACCOUNTING     NEW YORK
                 20 RESEARCH       DALLAS
                 30 SALES          CHICAGO
                 40 OPERATIONS     BOSTON
    SQL> select * from "Dept"
      2  /
             Deptno Dname          Loc
                 10 ACCOUNTING     NEW YORK
                 20 RESEARCH       DALLAS
                 30 SALES          CHICAGO
                 40 OPERATIONS     BOSTON
    SQL>As I understand, you could use the views (instead of the tables) to automatically generate mixed case classes while continuing to have case insensitve queries?!

  • Creating data server for xml

    Hi,
    I am trying to create a dataserver for xml using following info:
    jdbc driver: com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    jdbc url: jdbc:snps:xml?f=C:/Day_Dim.xml&re=Year&ro=false&case_sens=true
    But I am getting following error: "Connection Closed"
    Please help.
    Thanks,
    Monika

    Hi,
    Thans for your reply.
    This is the DTD for my xmldoc.
    <!ELEMENT Data (Department+)>
    <!ELEMENT EmployeeID (#PCDATA)>
    <!ATTLIST EmployeeID col (EMPID) #IMPLIED>
    <!ELEMENT Education (EmployeeID, Sequence, Dgree)>
    <!ATTLIST Education table NMTOKEN #IMPLIED>
    <!ELEMENT Employee (EmployeeName, EmployeeID, DepartmentID, Education*)>
    <!ATTLIST Employee table NMTOKEN #IMPLIED>
    <!ELEMENT EmployeeName (#PCDATA)>
    <!ATTLIST EmployeeName col NMTOKEN #IMPLIED>
    <!ELEMENT DepartName (#PCDATA)>
    <!ATTLIST DepartName col NMTOKEN #IMPLIED>
    <!ELEMENT Table (Column+)>
    <!ATTLIST Table importType NMTOKEN #IMPLIED>
    <!ATTLIST Table parentTable NMTOKEN #IMPLIED>
    <!ATTLIST Table tag NMTOKEN #IMPLIED>
    <!ATTLIST Table columns NMTOKEN #IMPLIED>
    <!ATTLIST Table name NMTOKEN #IMPLIED>
    <!ELEMENT DepartID (#PCDATA)>
    <!ATTLIST DepartID col NMTOKEN #IMPLIED>
    <!ELEMENT MetaData (Table+)>
    <!ELEMENT Sequence (#PCDATA)>
    <!ATTLIST Sequence col NMTOKEN #IMPLIED>
    <!ELEMENT Dgree (#PCDATA)>
    <!ATTLIST Dgree col NMTOKEN #IMPLIED>
    <!ELEMENT Export (MetaData, Data)>
    <!ELEMENT DepartmentID (#PCDATA)>
    <!ATTLIST DepartmentID col NMTOKEN #IMPLIED>
    <!ELEMENT Column (#PCDATA)>
    <!ATTLIST Column deleteKey NMTOKEN #IMPLIED>
    <!ATTLIST Column isKey NMTOKEN #IMPLIED>
    <!ELEMENT Department (DepartName, DepartID, Employee+)>
    <!ATTLIST Department table NMTOKEN #IMPLIED>
    Thanks again!
    Yan

Maybe you are looking for