xml question [message #664524] |
Thu, 20 July 2017 15:45 |
|
deb171100
Messages: 7 Registered: October 2015
|
Junior Member |
|
|
NAME
--------------------------------
DOCTYPE ---TAG
-------------------------------
DOC TYPE CODE
DOC TYPE VERSION
-------------------------------
DOC VERSION TEXT LINES --TAG
---------------------------------
DOC TYPE TEXT LINE NUMBER
DOC TYPE VERSION
----------------------------------
DOCUMENTENTRY --TAG
---------------------------
DOC ENTRY TEXT NUMBER
-------------------------------
other attributes above are repeated values for a given document type code.
How I can create the xml?
Input tables for the sql:
TABLE: DOC_TYPE_VER_TEXT_LINES
DOC TYPE CD, DOC TYPE VERSION, DOC TYPE TEXT LINE NUMBER -> PRIMARY KEY
DOCCX1,1,1
DOCCX1,1,2
....
DOCCX1,2,1
REFERENCE TABLE: DOC_TYPE_VERSION
TABLE: DOC_TYPE_VERSION_ENTRY_TEXT:
DOC TYPE CD, DOC TYPE TEXT VERSION NUMBER, DOC_ENTRY_TEXT_NUMBER -> PRIMARY KEY
DOCCX1,1,12
DOCCX1,1,21
....
DOCCX1,2,11
|
|
|
|
Re: xml question [message #664532 is a reply to message #664526] |
Fri, 21 July 2017 00:06 |
|
deb171100
Messages: 7 Registered: October 2015
|
Junior Member |
|
|
{code}
--------------------------------
DOCTYPE < ---this is XML TAG
-------------------------------
DOC TYPE CODE
DOC TYPE VERSION
-------------------------------
DOC VERSION TEXT LINES <--This is XML TAG
---------------------------------
DOC TYPE TEXT LINE NUMBER
DOC TYPE VERSION
----------------------------------
DOCUMENTENTRY <--This is XML TAG
---------------------------
DOC ENTRY TEXT NUMBER
-------------------------------
{/code}
other attributes above are repeated values for a given document type code derived from below table.
How I can create the xml?
{code}
Input tables:
TABLE: DOC_TYPE_VERSION
PRIMARY KEY:
DOC TYPE CD, DOC TYPE VERSION
Sample data with the above Primary key:
DOCCX1,1
DOCCX1,2
REFERENCE TABLE : DOC_TYPE
TABLE: DOC_TYPE_VER_TEXT_LINES
PRIMARY KEY:
DOC TYPE CD, DOC TYPE VERSION, DOC TYPE TEXT LINE NUMBER
Sample data with the above Primary key:
DOCCX1,1,1
DOCCX1,1,2
....
DOCCX1,2,1
REFERENCE TABLE: DOC_TYPE_VERSION
TABLE: DOC_TYPE_VERSION_ENTRY_TEXT
PRIMARY KEY:
DOC TYPE CD, DOC TYPE TEXT VERSION NUMBER, DOC_ENTRY_TEXT_NUMBER
Sanple data with the above Primary key:
DOCCX1,1,12
DOCCX1,1,21
....
DOCCX1,2,11
{/code}
[Updated on: Fri, 21 July 2017 00:08] Report message to a moderator
|
|
|
|
Re: xml question [message #664542 is a reply to message #664534] |
Fri, 21 July 2017 06:34 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
if you are trying to dump the contents of a query into xml see
select dbms_xmlgen.getxml('select * from <tablename>') xml from dual;
|
|
|