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.

Similar Messages

  • How can I see the hidden file and erase it?

    I had to make a file starting "." and had to put it on my FTP client. I made it by Text Edit and Microsoft word and save it. Since it is hidden file, I can't see on my Mac but when I use the FTP client and click post, the file listing was showed up and I can check as "Show Hidden file". Then I could post the files on the FTP client. However, since I don't need it on my computer, I'd like to erase it but can't find the files. How can I find the hidden files? Thank you.

    if you know the folder then navigate to that folder. Open the Terminal application in your Utiities folder and do the following::
    Enable Finder to Show Invisible Files and Folders
    Open the Terminal application in your Utilities folder. At the prompt enter or paste the following command line then press RETURN.
    defaults write com.apple.finder AppleShowAllFiles TRUE
    To turn off the display of invisible files and folders enter or paste the following command line and press RETURN.
    defaults write com.apple.finder AppleShowAllFiles FALSE
    Alternatively you can use one of the numerous third-party utilities such as TinkerTool or ShowHideInvisibleFiles - VersionTracker or MacUpdate.

  • How can I read the bootstrap files and extract the fragment-URLs and fragment-numbers in plain text?

    How can I read the bootstrap files of any HDS Live stream and extract the fragment-URLs and fragment-numbers in plain text?
    Could it be that it is some kind of compressed format in the bootstrap? Can I uncompress it wirh  f4fpackager.exe? Could not find any download for f4fpackager.exe. I would prefere less code to do so. Is there something in Java of JavaScript, that can extract the fragment-numbers?
    Thank you!

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • How can i transfer the xml files between different systems?

    hello
    the appearance of xml enable the inter-communication between differences systems.but
    i don't know how,such as following scinario:
    in the client side,we use the console that is written by using c#,if i finish
    filling the text boxes that are within the console,click the submit button,the
    console will generate a xml format document.i want the other application that
    is written by using jsp and servlet and deployed in weblogic server to receive
    the xml document,then process the document.
    but i don't know how i can transfer the xml files between the two applications
    that is written in different languages? can i use http protocol?
    thanks for any helps!

    Yes, you can use the HTTP protocol as a transport for the XML message, this
    is basically what the HTTP binding for SOAP does. The key is using a
    packaging mechanism that different applications will understand, otherwise
    only your own applications will know how to extract and process the XML
    messages you send between them.
    "zbcong" <[email protected]> wrote in message
    news:3e68318e$[email protected]..
    >
    hello
    the appearance of xml enable the inter-communication between differencessystems.but
    i don't know how,such as following scinario:
    in the client side,we use the console that is written by using c#,if ifinish
    filling the text boxes that are within the console,click the submitbutton,the
    console will generate a xml format document.i want the other applicationthat
    is written by using jsp and servlet and deployed in weblogic server toreceive
    the xml document,then process the document.
    but i don't know how i can transfer the xml files between the twoapplications
    that is written in different languages? can i use http protocol?
    thanks for any helps!

  • How can we locate the property file and read from it in .js page?

    HI
    I am having an static html page where in the url is hardcoded,so i wanted to read it from a property file and which can be done by using .js files
    i wanted to know how to deal with property files in .js?
    Thankx

    I assume you know that Java and JavaScript only share a name and they are both programming languages but little else.
    You can load JavaScript in Java 6. However for questions on what the JavaScript should do I suggest you try a javascript forum.

  • How can I skip the XML file's space & "\n" when using a DOM?

    This is my xml file below:
    <?xml version="1.0" encoding="UTF-8"?>
    <inventory>
      <item>
        <sku>3965</sku>
        <describtion>widget</describtion>
        <quality>108</quality>
      </item>
      <item>
        <sku>5478</sku>
        <describtion>gadget</describtion>
        <quality>101</quality>
      </item>
      <item>
        <sku>4575</sku>
        <describtion>sprocket</describtion>
        <quality>106</quality>
      </item>
    </inventory>between the <inventory> and the<item>,there is one "\n" and tow "space" ,
    then between the <item> and the <sku>,there is ...
    on and on...
    and this is my java code:
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    public class DomDemo {
      DocumentBuilderFactory dbf = null;
      DocumentBuilder df = null;
      Document doc = null;
      public DomDemo() {
        try {
          dbf = DocumentBuilderFactory.newInstance();
          dbf.setIgnoringElementContentWhitespace(true);
        catch(FactoryConfigurationError fce) {
          fce.printStackTrace();
        try { 
          df = dbf.newDocumentBuilder();
        catch(ParserConfigurationException pce) {
          pce.printStackTrace();
      public void printXML(Node node) {
        short nodeTypeValue;
        String nodeType = null;
        Node currentNode = null;
        nodeTypeValue = node.getNodeType();
        nodeType = getNodeType(nodeTypeValue);
        System.out.println("NodeType:" + nodeType);
        System.out.println("NodeName:" + node.getNodeName());
        System.out.println("NodeValue:" + node.getNodeValue());
        for(currentNode = node.getFirstChild(); currentNode != null; currentNode = currentNode.getNextSibling()) { 
          printXML(currentNode);
      public String getNodeType(short nodeTypeValue) {
        String nodeType = null;
        switch(nodeTypeValue) {
          case Node.DOCUMENT_NODE: 
            nodeType = "DocumentNode";
            break;
          case Node.ELEMENT_NODE:
            nodeType = "ElementNode";
            break;
          case Node.ATTRIBUTE_NODE:
            nodeType = "AttributeNode";
            break;
          case Node.TEXT_NODE:
            nodeType = "TextNode";
            break;
          default:
            nodeType = "OtherNode";
        return nodeType;
      public static void main(String[] args) {
        if(args.length == 0) {
         System.out.println("Usage:java DomDemo filename");
         System.exit(1);
        String file = args[0];
        DomDemo dd = new DomDemo();
        Document doc = null;
        try {
          doc = dd.df.parse(file);
        catch(Exception e) {
          e.printStackTrace();
        dd.printXML(doc);
    }when run the class, the result is below:
    NodeType:DocumentNode
    NodeName:#document
    NodeValue:null
    NodeType:ElementNode
    NodeName:inventory
    NodeValue:null
    NodeType:TextNode
    NodeName:#text
    NodeValue:
    NodeType:ElementNode
    NodeName:item
    NodeValue:null
    NodeType:TextNode
    NodeName:#text
    NodeValue:
    It contains a TextNode and its value is " " and a "\n".
    I used setIgnoringElementContentWhitespace feature, but it seems didn't work.
    How can i solve it?

    I used setIgnoringElementContentWhitespace feature, but it seems didn't work.
    Add a DTD to the XML document for setIgnoringElementContentWhitespace feature.

  • I have 2 questions (1 every time i open my e-mail it asked me to sign it did not do this before (2 how can i increase the font size and make it defalt

    question (1 every time i go into my e-mail i need to sign in i did not have to do this before please correct this sign in page
    (2 how can i keep my font size to 12.
    thank you joe ruda

    (1) Web site requires you to sign in each time
    Web sites generally remember your browser by a cookie they set.
    If you have changed your cookie settings (for example, by clearing them using Clear Private Data when you close the browser) or installed new third party software (security suite, system cleaner, etc.), you might be clearing the site's cookie.
    In some cases, it's possible that cookies can become corrupted. To clear the site's cookies, when viewing the site:
    "right-click" (Mac equivalent!) and choose View Page Info > Security > "View Cookies"
    In that dialog, you can remove the cookies. After reloading the page, you should be required to log in again and the site will create new cookies.
    (2) Remember font size setting
    Are you using a feature of your email site to increase the font? If the site can't remember that for you, then there might be an indirect solution (a hack) to fix it. Which webmail site is it? There might be a userscript available.
    If you mean Firefox's zoom setting, then Firefox should remember that between visits.

  • How can i read the text files and buffer the data in Vector?

    hi. I have been running into this problem for days, but with no luck and losing right direction.
    The problem is : I am trying to read a text file and buffer the data into a
    Queue for each user.
    the sample text file is as below:( 1st column is timestamp, 2nd is user_id, 3rd is packet_id, 4th is packet_seqno, 5th is packet_size)
    0 1 1 1 512
    1 2 1 2 512
    2 3 1 3 512
    3 4 1 4 512
    4 5 1 5 512
    5 6 1 6 512
    6 7 1 7 512
    7 8 1 8 512
    8 9 1 9 512
    9 10 1 10 512
    10 1 2 11 512
    11 2 2 12 512
    12 3 2 13 512
    13 4 2 14 512
    14 5 2 15 512
    15 6 2 16 512
    16 7 2 17 512
    17 8 2 18 512
    18 9 2 19 512
    19 10 2 20 512
    20 1 3 21 512
    21 2 3 22 512
    22 3 3 23 512
    23 4 3 24 512
    24 5 3 25 512
    25 6 3 26 512
    26 7 3 27 512
    27 8 3 28 512
    28 9 3 29 512
    29 10 3 30 512
    30 1 4 31 512
    31 2 4 32 512
    32 3 4 33 512
    33 4 4 34 512
    34 5 4 35 512
    35 6 4 36 512
    36 7 4 37 512
    37 8 4 38 512
    38 9 4 39 512
    39 10 4 40 512
    40 1 5 41 512
    41 2 5 42 512
    42 3 5 43 512
    43 4 5 44 512
    44 5 5 45 512
    45 6 5 46 512
    46 7 5 47 512
    47 8 5 48 512
    48 9 5 49 512
    49 10 5 50 512
    50 1 6 51 512
    51 2 6 52 512
    52 3 6 53 512
    53 4 6 54 512
    54 5 6 55 512
    55 6 6 56 512
    56 7 6 57 512
    57 8 6 58 512
    58 9 6 59 512
    59 10 6 60 512
    60 1 7 61 512
    61 2 7 62 512
    62 3 7 63 512
    63 4 7 64 512
    64 5 7 65 512
    65 6 7 66 512
    66 7 7 67 512
    67 8 7 68 512
    68 9 7 69 512
    69 10 7 70 512
    70 1 8 71 512
    71 2 8 72 512
    What I wanna do is to read all the data above and buffer them in a queue for each user( there are only 10 users in total).
    I already created a class called Class packet:
    public class packet {
        private int timestamp;
        private int user_id;
        private int packet_id;
        private int packet_seqno;
        private int packet_size;
        /** Creates a new instance of packet */
        public packet(int timestamp,int user_id, int packet_id,int packet_seqno, int packet_size)
            this.timestamp = timestamp;
            this.user_id=user_id;
            this.packet_id=packet_id;
            this.packet_seqno=packet_seqno;
            this.packet_size=packet_size;
    }then I wanna to create another Class called Class user which I can create a queue for each user (10 users in total) to store type packet information. the queue for each user will be in the order by timestamp.
    any idea and sample code will be appreciated.

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • How can I get the old file and bookmark back on the top left cnr.?

    I had to download FF as I had to do a reinstall for win 7. Now my old bar that had "file, to bookmarks"
    Is gone and I want it back! Also I had some icons below my Google start window, gone now, in fact I cannot find Google or Yahoo in the upper right corner. Also I DO NOT want all the add-ons. Every time you guys upgrade it gets worse. Can you not have a download site just for old buggers like me??

    See this about the Menu Bar. <br />
    https://support.mozilla.org/en-US/kb/display-firefox-button-menu-instead-menu-toolbar#w_ive-tried-it-and-i-want-to-go-back

  • How can I hide the class file ??

    Hi !
    I has a question, when i write a program of Java, then use the command "javac" to compiler to class file for other people using, but the class file can be disassembled and convert to source code. How can I hide the class file and let people can not disassemble, or can not see the source code. Thinks

    See these....
    http://www.saffeine.com/
    http://www.jarsafe.com/
    I recently read this. This will help you.
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Enojy....
    Rajesh

  • HT4796 How can I take the files that were migrated from my PC to my Mac and add all those files to my current user instead of having 2 users?

    How can I take the files that were migrated from my PC to my Mac and add all those files to my current user instead of having 2 users? Having to log out just to sign in on a different user to access the files is absurd.
    Do I make all the files sharable to all the NOW users on the mac then just delete the files? Or can i erase my account that I made when starting up my new mac and then just use the one with the transferred files?
    I just dont want to have to og in and out of 2 different accounts .. Help please.         
    -Nina

    Sorry. /Users is a folder path. It would be similar to C:\Users (if that exists on Windows).
    So, in the Finder, select Computer from the Go menu.
    You'll see Macintosh HD, double-click that to open it.
    In there you'll see several folders. One is Users. That is where all the user Home folders exist. Select the other account's home folder and go to step 3.
    If you have any more confusion, please stop and ask. We'll get there.
    If you feel more comfortable, you can just log into that other account and move the files into /Users/Shared.
    Then, log into the account you wish to use and copy the files from the Shared folder and paste them into your Home folder, wherever they belong, Documents, Music, Pictures, etc.  That just takes a little more work. Transferring them into Shared, and then copying into your home sets the permissions on the files so that you won't have a problem accessing them later. The steps I provided just prevent you from having to do the double move, since you are not going to use the old account once you are done.
    Quick unix shorthand. If someone gives you a file path that begins with a /, that means the root of the hard drive, ie Macintosh HD (if you haven't renamed it). The path separator in unix is /, not \.
    A path that starts with ~/ means your Home folder, the one inside /Users named with your account name.

  • How can i take the pictures from my old ipod and transfer them onto my computer without deleting anything

    How can I take the pics from my old ipod and transfer them onto my computer without deleting anything?

    Pictures on an iPod are stored in a special format, optimized for the iPod's small lower resolution screen, to save storage space.  iTunes puts them into that format when syncing.  There is setting in iTunes, on the iPod's Photos screen (where you set up syncing of photos) for Include full resolution photos.  If that checkbox was checked when you synced the photos to the iPod, THEN you can Enable disk use and find those photo files on the iPod in the Photos folder. 
    Otherwise, you cannot get your photos back, using iTunes.  There may be third-party utilities that can extract individual photos from the iPod, but they will still be lower-resolution versions of the original photo.

  • How can we take the cursor to a different sub-screen from the BADI?

    Hi,
    We have to do some validation on Header, Operation and Relationship of any work order (IW31, IW32). We have checked that validations can be done at BADI WORKORDER_UPDATE in the method u2018AT_SAVEu2019.  But user wants us to take the Cursor back to the field and screen due to which the error is coming. How can we take the cursor to a different sub-screen from the BADI?
    Thanks in Advance,
    Pranav

    You 'ran out of room' because you tried to put your entire question into what is the 'Topic line' of the post.
    This is a fairly common error, as a scan of the topic list will show, and likely due to a design flaw in the layout of the composition page.
    Most posters who make this error do so on their first post, and are able to avoid a similar misstep on their second and subsequent questions.
    Regards,
    Barry

  • I ask the third time: How can I enlarge the menue symbols and the text of the menue in Photoshop CS6 vers.13 so that I can read them??? My laptop has Win 8.1 and a screen resolution of 3840x2160

    I ask the third time:
    How can I enlarge the menue symbols and the text of the menue in Photoshop CS6 vers.13 so that I can read them??? My laptop has Win 8.1 and a screen resolution of 3840x2160.
    It is unbelievable that such an expensive software does not provide a proper lay out wit a high screen resolution!
    It is also unbelivable that it is not possible to get a qualified employee of ADOBE on the phone in Germany.
    hope of feed back: e-mail: [email protected]

    Chris Cox answered your question here:
    I have PS cs6 extended and a new laptop with screen resolution of 3840x2160. Now all control elements and menues are so small that I can not reed them. How can I make them readable without reducing the resolution of the schreen?

  • HT201240 I have a new macbook pro that did not have a disk, OS X was pre installed  so how can i change the administrators name and password, it did not migrate properly from my hard drive.., so how do i

    I have a new macbook pro that did not have a disk, OS X lion 7.3.4 was pre installed  so how can i change the administrators name and password, it did not migrate properly from my hard drive.., now there is some mysterious administrator name and or password??

    See #5
    Step by Step to fix your Mac

Maybe you are looking for

  • Wrong path on JNLP chain

    Hi Sorry to post it here, but I was unable to find where We can post JavaFX Issues. This is a minor issue, but need to be adressed. I always set my java Console to shown, to test my applets, etc. While testing some JavaFX, I could note that JavaFX ha

  • Is Identifier required for Private database link

    Hi All, A public database link is created between two databases: db1 and db2. x.world is the name of the link. when we access the data as select * from tab@x i am getting the data. But if the database link is private can we access the data using the

  • Insert a hashed password into OID

    I have the need to migrate all user accounts (stored in a custom table) into OID as we are moving over all login to Single Sign On Within our custom table, we store the Application username and password (hashed using DBMS_OBFUSCATION_TOOLKIT.MD5 func

  • Drop, create and insert data into few intermediate tables

    Hi All, I need to schedule a process to drop, create and insert data into few intermediate tables on a weekly basis. Here is what i need to do in the stored procedure, which can be scheduled weekly. DROP TABLE TABLE_NAME1; DROP TABLE TABLE_NAME2; DRO

  • DBI_RSQL_SQL_ERROR aftter CCMSBISETUP

    I get these dumps after I activated the BI reporting using CCMSBISETUP for IT performance reproting. Did anyone experience this? Here is the info: ormation on where terminated Termination occurred in the ABAP program "GP2UBV5OLGF4DSH5PYFR7SYRJTM" - i