Add schema location and version to the XML file header
HI, I used XMLBean to generate a XML file:
<?xml version="1.0" encoding="UTF-8"?>
<bo:TXLife xmlns:bo="http://ACORD.org/Standards/Life/2">
</bo:TXLife>
I need add a schema location, a version, another name space so the header looks
like:
<?xml version="1.0" encoding="UTF-8"?>
<bo:TXLife xmlns:bo="http://ACORD.org/Standards/Life/2"
xmlns:xsd="http://www.w3.com/2001/XMLSchema"
xmlns:xsi="http://www.w3.com/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.iit.com/schema/Schema29.xsd"
version="2.9">
</bo:TXLife>
Thanks,
Thanks Steve.
Your right, it seems that I can't access the attribute or in this case add it
by just editing the xsd. At least I haven't found a way to do that.
The cursor solution works ok, but we'll have to add that code to every transformation
etc.
Timo
"Steve Traut" <[email protected]> wrote:
Hello Timo -- Unless your schema defines the attribute as part of the
element you want to edit, I don't think you'll get access to the attribute
through JavaBeans-style accessors.
If you have any feedback about why the cursor won't work in your situation,
though, I'd love to hear it.
Steve
"Timo Lukumaa" <[email protected]> wrote in message
news:[email protected]...
Hello, where having a similar problem. We need a schema locationdefinition so
that XML is valid. We can edit the xsd files and add stuff there, wouldthere
be a way to do that with out the cursor? This cursor solution isn'ttoo
nice..
"Steve Traut" <[email protected]> wrote:
Henry -- You'll need an XmlCursor for inserting attributes that aren't
defined in your schema. Try something like the following.
TXLifeDocument txLifeDoc = TXLifeDocument.Factory.newInstance();
TXLife txLife = txLifeDoc.addNewTXLife();
// Create a cursor and move it to where you want to start inserting
attributes.
XmlCursor cursor = txLife.newCursor();
cursor.toFirstContentToken();
cursor.toLastAttribute();
// Insert your attributes.
cursor.insertAttributeWithValue("schemaLocation","http://www.w3.com/2001/XM
L
Schema-instance", "http://www.iit.com/schema/Schema29.xsd");
cursor.insertAttributeWithValue("version", "2.9");
cursor.insertNamespace("xsi",
"http://www.w3.com/2001/XMLSchema-instance");
cursor.insertNamespace("xsd", "http://www.w3.com/2001/XMLSchema");
// Dispose of the cursor.
cursor.dispose();
Steve
"Henry Niu" <[email protected]> wrote in message
news:[email protected]...
HI, I used XMLBean to generate a XML file:
<?xml version="1.0" encoding="UTF-8"?>
<bo:TXLife xmlns:bo="http://ACORD.org/Standards/Life/2">
</bo:TXLife>
I need add a schema location, a version, another name space so theheader
looks
like:
<?xml version="1.0" encoding="UTF-8"?>
<bo:TXLife xmlns:bo="http://ACORD.org/Standards/Life/2"
xmlns:xsd="http://www.w3.com/2001/XMLSchema"
xmlns:xsi="http://www.w3.com/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.iit.com/schema/Schema29.xsd"
version="2.9">
</bo:TXLife>
Thanks,
Similar Messages
-
Location and info about the config file for Shared connection URL
Hi,
Where does HypGetSharedConnectionsURL VBS function retrieve information from? In the help, only information is that it retrieves from the config file
ThanksThis URL is stored within the Windows registry.
-
How to add document name and document namespace to xml mail sender msg
Hi,
I have set up a sender mail CC that accepts messages already in XML format. However, the messages are missing the document name and document namespace. I am trying to use MessageTransformBean to add these to the message payload. However the examples I've found so far all talk about converting plain text coming in. When I used convertionTpe -> SimplePlain2XML it messed up the original content with unnecessary xml tags.
Can someone please tell me how to insert the document name and namespace into the payload without converting the original xml content? Thanks in advance.Dont think there is a way.
As the source is a XML, why dont you create the MessageType with the same name and namespace as the XML file in the email.
Regards,
Bhavesh -
IsSchemaValid does chang the xml-encoding header from UTF-8 to WINDOWS-1252
I found the following effect:
isSchemaValid does changing the encoding - entry of the xml-file-header
generating xml-file by using DBMS_XMLGEN :
xmldoc := DBMS_XMLGEN.getXML(ctx);
with the header of the file is
<?xml version="1.0" encoding="UTF-8"?>
change the xmldoc to a xmlType
and validate it against the schema
xmldoc_xmlType:=(xmltype(xmldoc)) ;
xmldoc_xmlType.isSchemaValid ( bSchemalocation)
after this the header of the file is
<?xml version="1.0" encoding="WINDOWS-1252"?>
my DB:
R11_2_0_2 / Windows 64
the same in
R11_2_0_1 / Windows 32
select name, value from v$parameter where upper(name) like '%NLS%'
nls_calendar
nls_comp BINARY
nls_currency
nls_date_format
nls_date_language
nls_dual_currency
nls_iso_currency
nls_language AMERICAN
nls_length_semantics BYTE
nls_nchar_conv_excp FALSE
nls_numeric_characters
nls_sort
nls_territory AMERICA
nls_time_format
nls_timestamp_format
nls_timestamp_tz_format
nls_time_tz_format
register my schema by:
dbms_xmlschema.registerSchema(
schemaurl => vschemaurl,
schemadoc => xsd_file,
local => FALSE,
gentypes => TRUE,
genbean => FALSE,
gentables => TRUE,
force => FALSE,
owner => dbuser
,CSID => nls_charset_id('AL32UTF8')
How can I let or change back the xml-encoding entry to UTF-8 ?
regardsYour solution should not be relied upon...
C:\Temp>sqlplus /nolog @t1 %CD%
SQL*Plus: Release 11.2.0.2.0 Production on Fri Mar 4 09:41:32 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> spool testcase.log
SQL> --
SQL> connect sys/oracle as sysdba
Connected.
SQL> --
SQL> set define on
SQL> set timing on
SQL> --
SQL> def XMLDIR = &1
SQL> --
SQL> def USERNAME = XDBTEST
SQL> --
SQL> def PASSWORD = &USERNAME
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> drop user &USERNAME cascade
2 /
old 1: drop user &USERNAME cascade
new 1: drop user XDBTEST cascade
User dropped.
Elapsed: 00:00:00.24
SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
2 /
old 1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
new 1: grant create any directory, drop any directory, connect, resource, alter session, create view to XDBTEST identified by XDBTEST
Grant succeeded.
Elapsed: 00:00:00.07
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
2 /
old 1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new 1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
User altered.
Elapsed: 00:00:00.00
SQL> set long 100000 pages 0 lines 256 trimspool on timing on
SQL> --
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> create or replace directory XMLDIR as '&XMLDIR'
2 /
old 1: create or replace directory XMLDIR as '&XMLDIR'
new 1: create or replace directory XMLDIR as 'C:\Temp'
Directory created.
Elapsed: 00:00:00.00
SQL> create table XML_DEFAULT of XMLTYPE
2 /
Table created.
Elapsed: 00:00:00.11
SQL> create table XML_CLOB of XMLTYPE
2 XMLTYPE store as CLOB
3 /
Table created.
Elapsed: 00:00:00.01
SQL> select *
2 from nls_database_parameters
3 where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET')
4 /
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CHARACTERSET AL32UTF8
Elapsed: 00:00:00.02
SQL> declare
2 XML_DEFAULT XMLType := xmltype('<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>') ;
3 XML_CLOB XMLType := xmltype('<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>') ;
4 begin
5 delete XML_DEFAULT;
6 delete XML_CLOB;
7 insert into XML_DEFAULT values (XML_DEFAULT);
8 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT.xml');
9 IF XML_DEFAULT.isSchemaValid ( 'SCHEMALOCATION_DOES_NO_MATTER_FOR_TEST_CASE.XSD', 'SCHEMA_NO_MATTER') = 1 THEN null; ELSE null; END IF;
10 commit;
11 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT_IS_VALID.xml',nls_charset_id('WE8MSWIN1252'));
12 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT_WIN1252.xml');
13 insert into XML_CLOB values (XML_CLOB);
14 dbms_xslprocessor.clob2file( XML_CLOB.getclobval() , 'XMLDIR','XML_CLOB.xml');
15 commit;
16 end ;
17 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.27
SQL> --
SQL> host type XML_DEFAULT.xml
<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>
SQL> --
SQL> host type XML_DEFAULT_IS_VALID.xml
<?xml version="1.0" encoding="UTF-8"?>
<TEST>SELECT</TEST>
SQL> --
SQL> host type XML_DEFAULT_WIN1252.xml
<?xml version="1.0" encoding="UTF-8"?>
<TEST>SELECT</TEST>
SQL> --
SQL> host type XML_CLOB.xml
<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>
SQL> --
SQL>First, the character set changes because isSchemaValid() causes the document to be parsed and converted to the internal database character set, as does storing it in a table.
It appear that your solution works in SQL because the semantics of SQL are such that it causes a 'copy' of the XMLType to take place before running the isSchemaValid() processing, were we to optimize away that copy as a result of a patch or performance optimization project then you solution would break...
If you want the output in a particular character set you should force that using XMLSerialize or getBlobVal(charsetid). Unfortunately we don't have a convience method for writing BLOBS on DBMS_XSLPROCESSOR... -
Hi all experts,
I am in Oracle Enterprise Manager 11g 11.2.0.1.0.
SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 22 11:40:23 2011
is there anyone know why
SQL> create or replace directory XMLDIR as '/xdb/faq/testdata'
2 /
SQL> set long 10000 pages 200 lines 150
SQL> --
SQL> select xmltype(bfilename('XMLDIR','2003.xml'),nls_charset_id('AL32UTF8'))
2 from dual
worked. but
SQL> create or replace directory XMLDIR as 'C:\Drag_list\Modified';
SQL> select xmltype(bfilename('XMLDIR','2011.xml'),nls_charset_id('AL32UTF8'))
from dual
did not work?
IS there any way I can load the .xml file list from 'C:\Drag_list\Modified' into xmltype table?
Thanks.did not work?Generally we'll need a bit more info than "it didn't work", was there an ora-X error message? What was the error?
Assuming you're on *nix a 'C:\<folder name>\...' directory spec just plain won't work, the directory has to point to a valid storage location on the database server host.
Try a host command (at the database server) and make sure the .xml file name and location is valid, in sqlplus a "bang" (exclamation) runs a host command, i.e.:
SQL> !ls -l /xdb/faq/testdata
... usr grp ... 2003.xml
...But if you are on windows, its the `host` command:
SQL> host dir c:\drag_list\modified
mm/dd/yyyy ... 2011.xml
... The create directory ... as ... must point to a valid storage location for it to work, at least that is step one. -
Error while downloading the xml file
i am having a internal table which contains data in xml format but i am unable to download the data into local system by using 'GUI_DOWNLOAD' fn. module
its error its showing is as :
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
A name contained an invalid character. Error processing resource 'file:///D:/XX.XML'. Line 4, Position 4
MOD/><RPTSX/><MANDT/><SYPSY/><SYSID/><SAPRL/></T682><T682><KVEWE>A</KV...hello Durairaj,
i am fwd the code go thru it and check why the xml file is not downloading,
and after downloading the file i want that file to be in displayed in .pdf.
REPORT ZCCSV_TO_XML.
DATA : BEGIN OF TABLE OCCURS 0,
TABNAME(15) TYPE C,
END OF TABLE.
DATA : BEGIN OF HEADER_NAMTAB OCCURS 0,
NAMTAB TYPE STRING,
END OF HEADER_NAMTAB.
DATA : BEGIN OF CONVERT_ITAB_TO_XML OCCURS 0,
FIELDNAME(255) TYPE C,
END OF CONVERT_ITAB_TO_XML .
DATA : BEGIN OF CONVERT_XML_TO_ITAB OCCURS 0,
FIELDNAME(255) TYPE C,
END OF CONVERT_XML_TO_ITAB.
DATA DREF TYPE REF TO DATA.
DATA TNAME LIKE DD02L-TABNAME.
DATA BEGIN OF ZDFIES OCCURS 0.
INCLUDE STRUCTURE DFIES.
DATA END OF ZDFIES.
DATA: xml_out TYPE string .
DATA: xml_TO_ITAB TYPE string .
data : wa_indx type indx.
DATA : DETAIL(30).
DATA : DATA1 TYPE STRING.
DATA : COMMA . "VALUE ','.
DATA : DBTAB1(15) TYPE C.
FIELD-SYMBOLS: <ITAB> TYPE ANY TABLE,
<WA> TYPE ANY,
<WA1> TYPE ANY .
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME,
SKIP 1.
PARAMETERS : SPOOL RADIOBUTTON GROUP rad1 DEFAULT 'X',
CSV RADIOBUTTON GROUP rad1 ,
XMLTOPDF RADIOBUTTON GROUP rad1.
SELECTION-SCREEN : SKIP 1,
END OF BLOCK b1.
TABLE-TABNAME = 'T681'.
APPEND TABLE.
TABLE-TABNAME = 'T682'.
APPEND TABLE.
IF SPOOL = 'X'.
PERFORM SPOOL.
ELSEIF CSV = 'X'.
PERFORM CSV.
ELSEIF XMLTOPDF = 'X'.
PERFORM XMLTOPDF.
ENDIF.
*& Form CSV
form CSV .
LOOP AT TABLE.
dbtab1 = TABLE-TABNAME.
TNAME = dbtab1.
PERFORM GETFIELDS.
LOOP AT HEADER_NAMTAB.
WRITE: HEADER_NAMTAB-NAMTAB, COMMA.
ENDLOOP.
PERFORM GET_DETAIL_LIST.
ENDLOOP.
endform. " CSV
form XMLTOPDF .
LOOP AT TABLE.
PERFORM GET_DETAIL_LIST.
ENDLOOP.
endform. " XMLTOPDF
GETTING THE HEADER OF THE TABLE *
FORM GETFIELDS.
REFRESH HEADER_NAMTAB.
CALL FUNCTION 'GET_FIELDTAB'
EXPORTING
LANGU = SY-LANGU
ONLY = SPACE
TABNAME = TNAME
WITHTEXT = 'X'
TABLES
FIELDTAB = ZDFIES
EXCEPTIONS
INTERNAL_ERROR = 01
NO_TEXTS_FOUND = 02
TABLE_HAS_NO_FIELDS = 03
TABLE_NOT_ACTIV = 04.
CASE SY-SUBRC.
WHEN 0.
LOOP AT ZDFIES.
HEADER_NAMTAB-NAMTAB = ZDFIES-SCRTEXT_M.
APPEND HEADER_NAMTAB.
ENDLOOP.
WHEN OTHERS.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-SUBRC.
ENDCASE.
ENDFORM. " GETFIELEDS
*& Form GET_DETAIL_LIST
form GET_DETAIL_LIST .
CREATE DATA DREF TYPE STANDARD TABLE OF (TABLE)
WITH NON-UNIQUE DEFAULT KEY.
ASSIGN DREF->* TO <ITAB> .
SELECT * FROM (TABLE) INTO TABLE <ITAB>.
CALL TRANSFORMATION ('ID')
SOURCE tab = <ITAB>[]
RESULT XML xml_out.
Convert to TABLE
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
EXPORTING
i_string = xml_out
i_tabline_length = 100
TABLES
et_table = CONVERT_ITAB_TO_XML.
Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'ASC'
filename = 'D:\XX.XML'
TABLES
data_tab = CONVERT_ITAB_TO_XML
endform. -
The attached VI works when I run it initially creating the XML file, but when I change data and run after the XML file is created, it's not updated with new data. What am I doing wrong?
Thank you.
Solved!
Go to Solution.
Attachments:
Attractive Force XML.vi 23 KBThat looks like the logic which was written into the VI
Inner true/ false case:
(file exists : false) write to XML file, unflatten for display
(file exists : true) read from XML file, unflatten for display
At no time when the file exists (true case) is the XML file updated... -
Load xml to Datagrid, add row or edit and save it to the xml file??
Good afternoon,
I know how to load the xml, add a row or edit the data in a datagrid . Only thing I dont't know
how to save the changes to the xml file. I'm ussing Flash Professional CC and it wil be an Adobe Air
desktop application.Hi, and thank for the reply. Problem is not saving the xml, but getting the edited or new rows in the datagrid to be saved in the xml.....
-
Hi All-
Before starting installation, I would like to find out What EDITION and VERSION is the SQL Server Software ISO.
Please note this is not to find out what version is the installed sql server but before the installation: Is there a note or abrv. that describes what kind of Edition and version is the ISO?
Detail explanation is appreciated.
Thanks.
belayzeleka@Balmukund - Thanks for the input - That one is a nice blog!
But assuming you can`t change the Product Key value (you are not provided that number, as you know it gets populated by itself) can you find out
what implies the corresponding edition? If there is a folder where this reference is store, could you provide the full file path where this folder is located?
The ideal solution would be a way to find out what the Edition
is befor we start installation.
Thanks!
Also just to add what I came across:
The SQL Server 2012 installation software comes with pretty much all edition in it, that kind of makes it difficult to easily identify what edition is the specific ISO, but when
one downloads from MSDN one must downloads the
right edition either Standard,
Enterprise, etc so that when you install it, it installs whatever edition is downloaded.
The best source would be whoever downloaded the software.
Also, before going too far, you can find out what edition it is being installed right before the setup wizard finishes on the
License Terms page (Microsoft Software License Terms Page) and if the edition is not the one you intended to install, you can cancel it there and everything will be rolled back- no hastle.
belayzeleka -
How can I take the part that parses the .XML file and make it a procedure.
CREATE OR REPLACE PACKAGE BODY XMLSTUD6 AS
Author: Jimmy Harris
Created: 5/25/2006
Purpose: 1.This package has an XML file initialized to a variable called DOC .
2.It will then take the values from the XML file and insert them into a PL/SQL table.
3.From the PL/SQL table it will insert values into the STUDENTS table.
4.After step four above, the STUDLOAD procedure will insert (Sequence,Status, .XML file, USER, SYSDATE, ERROR_Message
into the AUDIT_XMLSTUD table regardless if insert status was successfull or not status is indicated by either an Y or
NO and the original XML filed that was currently processed, the date and user who executed the procedure.
If the status was NO then it will insert the Oracle SQLERRM massage, into the REASON_FOR_ERROR column.
If status is Y then REASOK_FOR_ERROR IS NULL.
5,Make sure you embed the xml file with an inner and outer ' ' ie: ' the whole .xml file string ' as the input
parameter into the STUDLOAD procedure.
This package excepts the whole .XML file as a CLOB as an input parameter, so that the end-user will not have
modify the code.
Modification History: 1.6/09/2006 JImmy Harris Modified code, added the Function "WORD_CONVERTER1" to accept the requested text data and
return a coded value back to our Welligent system.
2. Was advised that a front end type of functionality was not neccesary for this issue so I removed the INSERT_XML_FILE,
UPDATE_XML_FILE and the INSERT_XML_file.
FUNCTION WORD_CONVERTER1 (v_domain IN VARCHAR2 := null,
v_incoming IN VARCHAR2 := null) RETURN VARCHAR2 IS
v_well VARCHAR2(32);
v_editdd BOOLEAN;
v_code VARCHAR2(32);
CURSOR C_conv_wrd IS
SELECT WELL
INTO v_code
FROM CONVERSION_TABLE
WHERE DOMAIN = UPPER(TRIM(v_domain))
AND INCOMING = UPPER(TRIM(v_incoming));
BEGIN
OPEN c_conv_wrd;
LOOP
FETCH c_conv_wrd INTO v_code;
EXIT WHEN c_conv_wrd%NOTFOUND;
END LOOP;
CLOSE c_conv_wrd;
RETURN v_code;
END WORD_CONVERTER1;
PROCEDURE STUDLOAD (DOC CLOB) IS
v_parser xmlparser.Parser;
v_doc xmldom.DOMDocument;
v_nl xmldom.DOMNodeList;
v_n xmldom.DOMNode;
v_mm NUMBER;
v_dd NUMBER;
v_yyyy NUMBER;
v_DATE DATE;
v_race VARCHAR2(1);
v_eth VARCHAR2(1);
v_prim_lang VARCHAR2(1);
v_house_lang VARCHAR2(1);
v_gender VARCHAR2(1);
TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
s_tab stuxml_type := stuxml_type();
v_success VARCHAR2(200);
v_failure VARCHAR2(200);
l_error_code varchar2(200);
BEGIN
-- Create a parser.
v_parser := xmlparser.newParser;
xmlparser.setValidationMode(v_parser, FALSE);
-- Parse the document and create a new DOM document.
SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
v_doc := SYS.XMLPARSER.getDocument(v_parser);
-- Free resources associated with the Parser now it is no longer needed.
xmlparser.freeParser(v_parser);
-- Get a list of all the STUD nodes in the document using the XPATH syntax.
v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent');
-- Loop through the list and create a new record in a table collection for each STUD record.
FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
v_n := xmldom.item(v_nl, stud);
s_tab.extend;
-- Use XPATH syntax to assign values to he elements of the collection.
s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/LastName');
s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/FirstName');
s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/MiddleName');
v_dd := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Day');
v_mm := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Month');
v_yyyy := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Year');
v_DATE := TO_DATE(v_mm||' '||v_dd||' '||v_yyyy,'MMDDYYYY');
s_tab(s_tab.last).STUDENT_DOB := v_date;
s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/Street');
s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ApartmentNumber');
s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/County');
s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/State');
s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ZipCode');
v_race := WORD_CONVERTER1('RACE',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Race')));
v_eth := WORD_CONVERTER1('EHTNICITY',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Ethnicity')));
v_prim_lang:= WORD_CONVERTER1('PRIMARY_LANG',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/PrimaryLanguage')));
v_house_lang:= WORD_CONVERTER1('SECONDARY_LANG',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/HouseholdLanguage')));
v_gender := WORD_CONVERTER1('GENDER',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Gender')));
s_tab(s_tab.last).STUDENT_RACE := v_race;
s_tab(s_tab.last).STUDENT_ETHNIC := v_eth;
s_tab(s_tab.last).STUDENT_PRI_LANG :=v_prim_lang;
s_tab(s_tab.last).STUDENT_SEC_LANG := v_house_lang;
s_tab(s_tab.last).STUDENT_GENDER :=v_gender;
END LOOP;
FOR stud IN s_tab.first..s_tab.last LOOP
INSERT INTO STUDENTS (SHISID, SSN, DOE_SCHOOL_NUMBER,PATIENT_TYPE, TEACHER, HOMEROOM,STUDENT_LAST_NAME, STUDENT_FIRST_NAME, STUDENT_MI,STUDENT_DOB,
STUDENT_BIRTH_CERT, STUDENT_COMM,STUDENT_MUSA, STUDENT_FAMSIZE, STUDENT_FAMINCOME,STUDENT_UNINSURED, STUDENT_LUNCH, STUDENT_ZIP,STUDENT_STATE,
STUDENT_COUNTY, STUDENT_STREET,STUDENT_APART_NO, STUDENT_PHONE, STUDENT_H2O_TYPE,STUDENT_WASTE_TRT, STUDENT_HOME_SET, STUDENT_NONHOME_SET,
STUDENT_GENDER, STUDENT_RACE, STUDENT_ETHNIC,STUDENT_PRI_LANG, STUDENT_SEC_LANG, STUDENT_ATRISK,EMER_COND_MEMO, ASSIST_DEVICE_TYPE,
SCHOOL_ENTER_AGE,STUDENT_CURR_GRADE, S504_ELIG_DATE, S504_DEV_DATE,S504_REV_DATE, STUDENT_504, STUDENT_IEP,IEP_EXP_DATE, GRAD_CLASS, TYPE_DIPLOMA,
GRADE_RETAIN, LIT_PASS_TEST_MATH, LIT_PASS_DATE_MATH,LIT_PASS_TEST_WRITE, LIT_PASS_DATE_WRITE, LIT_PASS_TEST_READ,LIT_PASS_DATE_READ, SPEC_ED_ELIG,
SPEC_ED_CODE,TRANSPORT_CODE, TRANSPORT_NO, PRIME_HANDICAP,PRIME_HANDICAP_PERCENT, PRIME_HANDI_MANAGER, FIRST_ADD_HANDI,FIRST_ADD_HANDICAP_PERCENT,
FIRST_ADD_HANDI_504, FIRST_ADD_HANDI_504_DATE, SECOND_ADD_HANDI, SECOND_ADD_HANDICAP_PERCENT, MED_EXTERNAL_NAME, INS_TYPE, INS_PRI, INS_NAME,
INS_MEDICAID_NO, ELIGDATE, INS_PRIV_INSURANCE, INS_APPR_BILL, INS_APPR_DATE, INS_PARENT_APPR,INS_POL_NAME, INS_POL_NO, INS_CARRIER_NO,
INS_CARRIER_NAME, INS_CARRIER_RELATE, INS_AFFECT_DATE, INS_COPAY_OV, INS_COPAY_RX, INS_COPAY_AMBUL,INS_COPAY_EMER, INS_COPAY_OUTPAT,STUDENT_INACTIVE,
PHYS_ID, ENCOUNTERNUM,USERID,MODDATE, STUDENT_ID, S504_DISABILITY,CHAPTER1, WELLNESS_ENROLL, SCHOOL_OF_RESIDENCE,INITIAL_IEP_DATE, CALENDAR_TRACK,
USA_BORN,ALT_ID, FUTURE_SCHOOL, IEP_LAST_MEETING,IEP_LAST_SETTING, IEP_LAST_REFER_EVAL, THIRD_ADD_HANDI,LEP, GIFTED, IEP_EXIT_REASON,
CASE_MANAGER_ID, INTAKE_NOTES, CALLER_PHONE,CALL_DATE, CALLER_RELATIONSHIP, CALLER_NAME,BUSINESS_PHONE, FAX, EMAIL,HIGHEST_EDUCATION, INTAKE_DATE,
SERVICE_COORDINATOR, DISCHARGE_DATE, DISCHARGE_REASON, DISCHARGE_NOTES,INTAKE_BY, INTAKE_STATUS, IEP_LAST_SERVED_DATE,IEP_APC_DATE, IEP_EXIT_DATE,
ADDRESS2, LEGAL_STATUS, RELIGION, EMPLOYMENT_STATUS, TARG_POP_GROUP1, TARG_POP_GROUP2, MARITAL_STATUS,THIRD_ADD_HANDI_PERCENT, LAST_INTERFACE_DATE,
SERVICE_PLAN_TYPE,CURRENT_JURISDICTION, FIPS, BIRTH_PLACE_JURISDICTION,BIRTH_PLACE_HOSPITAL, BIRTH_PLACE_STATE, BIRTH_PLACE_COUNTRY,
OTHER_CLIENT_NAME, SIBLINGS_WITH_SERVICES, PERM_SHARE_INFORMATION,PERM_VERIFY_INSURANCE, REFERRING_AGENCY, REFERRING_INDIVIDUAL,AUTOMATIC_ELIGIBILITY,
INTAKE_IEP_ID, FUTURE_SCHOOL2,FUTURE_SCHOOL3, TRANSLATOR_NEEDED, TOTAL_CHILDREN_IN_HOME,REFERRED_BY, FAMILY_ID, SCREENING_CONSENT_FLAG,PICTURE_FILE,
DUAL_ENROLLED, DOE_SCHOOL_NUMBER2)
VALUES (123456789025, null,null ,null,null,null ,s_tab(stud).STUDENT_LAST_NAME,s_tab(stud).STUDENT_FIRST_NAME,s_tab(stud).STUDENT_MI,
s_tab(stud).STUDENT_DOB,null ,null,null ,null,null,null,null,s_tab(stud).STUDENT_ZIP,s_tab(stud).STUDENT_STATE ,s_tab(stud).STUDENT_COUNTY,
s_tab(stud).STUDENT_STREET,s_tab(stud).STUDENT_APART_NO,null,null,null ,null , null,
s_tab(stud).STUDENT_GENDER ,s_tab(stud).STUDENT_RACE , s_tab(stud).STUDENT_ETHNIC,
s_tab(stud).STUDENT_PRI_LANG ,s_tab(stud).STUDENT_SEC_LANG, null, null ,null , null,
null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null,
null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null ,null , null, null, null,null );
END LOOP;
INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,DOC,'Y',NULL,SYSDATE);
HTP.HTMLOPEN;
v_success:= 'The values from the .XML file have been successfully inserted into the STUDENTS table in the Oracle Database.';
htp.bold(v_success);
HTP.HTMLCLOSE;
COMMIT;
-- Free any resources associated with the document now it that it is no longer needed.
xmldom.freeDocument(v_doc);
EXCEPTION
WHEN OTHERS THEN
l_error_code := SQLERRM;
INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,nvl(DOC,TO_CLOB('No .XML file entered, user pressed button without entering correct information.')),'NO',l_error_code,SYSDATE);
HTP.HTMLOPEN;
v_failure:= 'The attempt made to insert files to the Student table has failed because,'||l_error_code;
htp.bold(v_failure);
HTP.HTMLCLOSE;
COMMIT;
END STUDLOAD;
PROCEDURE UPDSTUDLOAD (DOC CLOB) IS
v_parser xmlparser.Parser;
v_doc xmldom.DOMDocument;
v_nl xmldom.DOMNodeList;
v_n xmldom.DOMNode;
v_mm NUMBER;
v_dd NUMBER;
v_yyyy NUMBER;
v_DATE DATE;
v_race VARCHAR2(1);
v_eth VARCHAR2(1);
v_prim_lang VARCHAR2(1);
v_house_lang VARCHAR2(1);
v_gender VARCHAR2(1);
TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
s_tab stuxml_type := stuxml_type();
v_success VARCHAR2(200);
v_failure VARCHAR2(200);
l_error_code varchar2(200);
BEGIN
-- Create a parser.
v_parser := xmlparser.newParser;
xmlparser.setValidationMode(v_parser, FALSE);
-- Parse the document and create a new DOM document.
SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
v_doc := SYS.XMLPARSER.getDocument(v_parser);
-- Free resources associated with the Parser now it is no longer needed.
xmlparser.freeParser(v_parser);
-- Get a list of all the STUD nodes in the document using the XPATH syntax.
v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent');
-- Loop through the list and create a new record in a table collection for each STUD record.
FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
v_n := xmldom.item(v_nl, stud);
s_tab.extend;
-- Use XPATH syntax to assign values to he elements of the collection.
s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/LastName');
s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/FirstName');
s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/MiddleName');
v_dd := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Day');
v_mm := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Month');
v_yyyy := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Year');
v_DATE := TO_DATE(v_mm||' '||v_dd||' '||v_yyyy,'MMDDYYYY');
s_tab(s_tab.last).STUDENT_DOB := v_date;
s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/Street');
s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ApartmentNumber');
s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/County');
s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/State');
s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ZipCode');
v_race := WORD_CONVERTER1('RACE',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Race')));
v_eth := WORD_CONVERTER1('EHTNICITY',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Ethnicity')));
v_prim_lang:= WORD_CONVERTER1('PRIMARY_LANG',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/PrimaryLanguage')));
v_house_lang:= WORD_CONVERTER1('SECONDARY_LANG',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/HouseholdLanguage')));
v_gender := WORD_CONVERTER1('GENDER',UPPER(xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Gender')));
s_tab(s_tab.last).STUDENT_RACE := v_race;
s_tab(s_tab.last).STUDENT_ETHNIC := v_eth;
s_tab(s_tab.last).STUDENT_PRI_LANG :=v_prim_lang;
s_tab(s_tab.last).STUDENT_SEC_LANG := v_house_lang;
s_tab(s_tab.last).STUDENT_GENDER :=v_gender;
END LOOP;
FOR stud IN s_tab.first..s_tab.last LOOP
UPDATE STUDENTS
SET
STUDENT_LAST_NAME = s_tab(stud).STUDENT_LAST_NAME,
STUDENT_FIRST_NAME = s_tab(stud).STUDENT_FIRST_NAME,
STUDENT_MI = s_tab(stud).STUDENT_MI,
STUDENT_DOB = s_tab(stud).STUDENT_DOB,
STUDENT_ZIP = s_tab(stud).STUDENT_ZIP,
STUDENT_STATE = s_tab(stud).STUDENT_STATE,
STUDENT_COUNTY = s_tab(stud).STUDENT_COUNTY,
STUDENT_STREET = s_tab(stud).STUDENT_STREET,
STUDENT_APART_NO = s_tab(stud).STUDENT_APART_NO
WHERE SHISID = 123456789025;
END LOOP;
INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,DOC,'Y',NULL,SYSDATE);
HTP.HTMLOPEN;
v_success:= 'The updated .XML file has been successfully saved to the STUDENTS table in the Oracle Database.';
htp.bold(v_success);
HTP.HTMLCLOSE;
COMMIT;
-- Free any resources associated with the document now it that it is no longer needed.
xmldom.freeDocument(v_doc);
EXCEPTION
WHEN OTHERS THEN
l_error_code := SQLERRM;
INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,nvl(DOC,TO_CLOB('No .XML file entered, user pressed button without entering correct information.')),'NO',l_error_code,SYSDATE);
HTP.HTMLOPEN;
v_failure:= 'The attempt made to insert files to the Student table has failed because,'||l_error_code;
htp.bold(v_failure);
HTP.HTMLCLOSE;
COMMIT;
END UPDSTUDLOAD;
PROCEDURE DELSTUDLOAD (DOC CLOB) IS
v_parser xmlparser.Parser;
v_doc xmldom.DOMDocument;
v_nl xmldom.DOMNodeList;
v_n xmldom.DOMNode;
v_mm NUMBER;
v_dd NUMBER;
v_yyyy NUMBER;
v_DATE DATE;
TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
s_tab stuxml_type := stuxml_type();
v_success VARCHAR2(200);
v_failure VARCHAR2(200);
l_error_code varchar2(200);
BEGIN
-- Create a parser.
v_parser := xmlparser.newParser;
xmlparser.setValidationMode(v_parser, FALSE);
-- Parse the document and create a new DOM document.
SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
v_doc := SYS.XMLPARSER.getDocument(v_parser);
-- Free resources associated with the Parser now it is no longer needed.
xmlparser.freeParser(v_parser);
-- Get a list of all the STUD nodes in the document using the XPATH syntax.
v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent');
-- Loop through the list and create a new record in a table collection for each STUD record.
FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
v_n := xmldom.item(v_nl, stud);
s_tab.extend;
-- Use XPATH syntax to assign values to he elements of the collection.
s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/LastName');
s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/FirstName');
s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Name/MiddleName');
v_dd := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Day');
v_mm := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Month');
v_yyyy := xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/BirthDate/Year');
v_DATE := TO_DATE(v_mm||' '||v_dd||' '||v_yyyy,'MMDDYYYY');
s_tab(s_tab.last).STUDENT_DOB := v_date;
s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/Street');
s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ApartmentNumber');
s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/County');
s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/State');
s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address/ZipCode');
END LOOP;
FOR stud IN s_tab.first..s_tab.last LOOP
DELETE FROM STUDENTS
WHERE SHISID = 123456789025;
END LOOP;
INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,DOC,'Y',NULL,SYSDATE);
HTP.HTMLOPEN;
v_success:= 'The .XML file has been successfully deleted from the STUDENTS table in the Oracle Database.';
htp.bold(v_success);
HTP.HTMLCLOSE;
COMMIT;
-- Free any resources associated with the document now it that it is no longer needed.
xmldom.freeDocument(v_doc);
EXCEPTION
WHEN OTHERS THEN
l_error_code := SQLERRM;
INSERT INTO AUDIT_XMLSTUD1(XMLSTUDPK,USERID,XMLFILE,STATUS,REASON_FOR_ERROR,DATE_MODIFIED)
VALUES(SEQ_XMLSTUD1.NEXTVAL,USER,nvl(DOC,TO_CLOB('No .XML file entered, user pressed button without entering correct information.')),'NO',l_error_code,SYSDATE);
HTP.HTMLOPEN;
v_failure:= 'The attempt made to insert files to the Student table has failed because,'||l_error_code;
htp.bold(v_failure);
HTP.HTMLCLOSE;
COMMIT;
END DELSTUDLOAD;
END XMLSTUD6;Try opening the problem files using a text editor or file viewer to see what the first few bytes contain. All valid FM binary files for FM 11 will contain <MakerFile 11.0> in the first bytes of the file.
When updating books, it's sometimes better to just to create a new book file and add the files to that.
When renaming files in a book, changes at the system level will break any links/cross-references between files, so it's always best to use the Rename option in the Book file to change FM file names. This will maintain the correct linkages. -
Problems with and tags while reading the xml file
Hi
I am using the xml files in my project. The project uses Tomcat, JMS. The project is divided into some components which communicate with each oher thru JMS. The component for which I am responsible gets a dcoument object from the JMS which is a processed xml of the following format (the processing is done by the DBMS_XMLGEN package of oracle)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<filename>157_1000000001</filename>
<querydata>
<tabdata>
<tabinfo>Tab-id3</tabinfo>
<queryset>
<query name="Fax">
select a.ARLN_NAME,d.TICKETED_ORIGIN,d.TICKETED_DESTINATION, d.ENDORSEMENTS,to_char(d.DATE_OF_ISSUE,'DDMONYY') as DATE_OF_ISSUE ,d.EXCHANGE_DOC_TYPE,
d.PASSENGER_NAME,d.ORIG_ISS_AIRLINE,d.ORIG_DOC_NO,d.ORIG_PLACE_OF_ISSUE,
to_char(d.ORIG_DATE_OF_ISSUE,'DDMONYY'),d.ORIG_ISSUE_AGENT,d.CUR_OF_SALE,d.GROSS_FARE,d.EQUIV_CUR_OF_SALE,d.EQUIV_FARE,
d.PANDA_DEAL_CODE,d.ISI,d.reporting_date
from airline_master a,ticket_main d,ticket_conj e where d.doc_no = e.doc_no and d.iss_airline = e.iss_airline
and e.conj_doc_no = (select DOC_NO from TICKET_CONJ where CONJ_DOC_NO = 1000000001 and ISS_AIRLINE = 157)
and e.ISS_AIRLINE = 157 and d.iss_airline = a.ARLN_NUM_CODE
</query>
</queryset>
</tabdata>
</querydata>
the function on my side is like this
private void processMessage(ObjectMessage objmessage)
Document XMLreqObject = (Document) objmessage.getObject();
Element root = XMLreqObject.getRootElement();
String resultFilename = root.getChildText("filename");
Element tabSet = root.getChild("querydata");//doesnt work
ArrayList tabSetlist = new ArrayList(tabSet.getChildren ("tabdata"));//doesnt work
The code commented with "doesnt work", is not working. What must be the problem ?
Thanks in Advance
MartinOkay. Your original example XML didn't include < or > which was rather confusing if that particular feature was supposed to be the cause of the problem. Also calling them "tags" was rather confusing since "tags" is the term for the things that come at the beginning and of an element, like this:<data>...</data>Anyway, I assume your theory is that documents that don't have < in a text element process correctly and documents that do have < in a text element get "stuck" in the parser? Well, from your original description the process appears to be:
1. Create XML
2. Parse it into a Document
3. Send the Document via JMS
4. Receive the Document via JMS
5. Process it.
And it's step 4 that is "stuck"? That would be my guess based on the code you posted. -
Comparing an excel file to and xml file and appending data to the xml file
I have an xml file (mapsource) and an excel file. One of the columns in the excel file matches up with a node in the xml file. I want to be able to loop through both files and add a new node to the xml file where the one of the columns in the excel file matches a node in the xml file.
I can create a query object out of the excel dosument using the cfspreadsheet tag.
I'm able to use xmlparse to create a xml document object from the xml file.
What I would like to do is add col_3 from the excel spreadsheet as a new node when col_2 is equal to gpx.wpt.name.xmltext of the xml object.
Any help or direction would be very helpful!Hi,
Thank you for your reply. But I have to attach an excel file from a particular path (C:\TEMP\TEST.XLS) and I have to send that excel file to the user inbox.That excel file has multiple sheets with data. Can you please provide me any code is available.
Thanks and Regards
venkat. -
When I download an add-on such as Colorful Tabs and start the installation process, I receive a message that Firefox cannot install the add-on because it cannot modify the necessary file. To what file is this referring?
That is usually caused by Firefox not unpacking the extension.
You can try to set the Boolean pref <b>extensions.alwaysUnpack</b> to <i>true</i> on the <b>about:config</b> page.
To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
If you see a warning then you can confirm that you want to access that page.<br />
*Use the Filter bar at to top of the about:config page to locate a preference more easily.
*Preferences that have been modified show as bold (user set).
*Preferences can be reset to the default via the right-click context menu if they are user set
*Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean) -
How to add a location of face in the new Photo App?
How to add a location of face in the new Photo App?
You have to open a photo, right klick it and click "add a new face" or something like that.
-
Why don't the Adobe Acrobat 10.1.6 and Adobe Reader 9.5.4 patches update the version on the exe file ? My vulnerability reports show these installations are not patched when they really are.
Hi All,
I also facing the same issue with Adobe reader 9.5.4 version update.
Previous Version installed: 9.5.3
AcroRd32.exe - File Version 9.5.3.305
AcroRd32.dll - File version 9.5.3.305
After update installation to 9.5.4, add or remove program shows latest version but exe and dll is not updated. Vulnerability assessment tools based on file version check identifies patch is still missing. Becomes a HEAD ACHE.
Adobe Reader 9 > Help > About Adobe Reader 9 - First shows version 9.5.4, if your click on it instead of showing AGM version next it shows version 9.5.3.305.
I tested for all previous versions of 9x, works fine in each update. Seems like patch is missing codes for updating file versions.
Waiting for an acknowledgement.
Maybe you are looking for
-
SSDT SSAS Project: Can't create multiple partitions
"Warning: The destination server is running a SQL Server edition that does not support multiple partitions. Please deploy to another server." I get this error, when I try to deploy against a SSAS 2012 Developer Edition instance, same happens when I
-
TrayApp Errors from HP Software
I have had some bad luck attempting to remove my HP Printer software due to some accidental removal of some files, not all of them, but the important parts of several. Now every time I start my computer it tries to start those files and results in a
-
Hi Experts, I have a very big report (pivot table) and the column names for that report goes off the screen while scrolling down to see the bellow reports. Now the business requirement is can we freeze the column names similar to Excel?? Is there any
-
How to close open JDBC connections
Hi people. I´m Using Jdev 10.1.3.2 and OAS 10g. In my application when a User closes the browser or click in logout, the JDBC connection remains active on the server. I wonder what the best measure to close these connections on logout of the system?
-
Creating a new profile did not solve my problem, it stayed the same. Whats the next step?