Loading XML(XSD) file into database by validating the format in file
Hi,
I have a file whose format is predefined as listed below
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="VVV">
<xs:complexType>
<xs:sequence>
<xs:element name="VVVHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="UniqueIdentifier" type="xs:SEQ0001"/>
<xs:element name="VVVFileType" type="xs:123"/>
<xs:element name="FileCreatedDatetime" type="xs:23-MAY-2006"/>
<xs:element name="ScanDatetime" type="xs:23-MAY-2006"/>
<xs:element name="BatchID" type="xs:456"/>
<xs:element name="BatchSequence" type="xs:1001"/>
<xs:element name="DataEntryDatetime" type="xs:23-MAY-2006"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="VVVDetail">
<xs:complexType>
<xs:sequence>
<xs:element name="RRRLocalOffice" type="xs:Mumbai"/>
<xs:element name="Duplicate" type="xs:No"/>
<xs:element name="ReRegMarker" type="xs:boolean"/>
<xs:element name="RegistrationMark" type="xs:Vishnu"/>
<xs:element name="RegMarkCheckDigit" type="xs:12S"/>
<xs:element name="TaxClassCode" type="xs:67"/>
<xs:element name="ExternalMakeCode" type="xs:Maruti"/>
<xs:element name="ExternalModelCode" type="xs:800LX"/>
<xs:element name="RRRMakeCode" type="xs:Mar"/>
<xs:element name="RRRModelCode" type="xs:800LV"/>
<xs:element name="RRRVehicleBodyCode" type="xs:98"/>
<xs:element name="RRRColourCode" type="xs:red"/>
<xs:element name="RegistrationDate" type="xs:23-MAY-2006"/>
<xs:element name="ChassisNumber" type="xs:num123"/>
<xs:element name="HC" type="xs:1.22"/>
<xs:element name="UnWeight" type="xs:90"/>
<xs:element name="NoSeats" type="xs:four"/>
<xs:element name="NOx" type="xs:2.22"/>
<xs:element name="RevenueWeight" type="xs:34"/>
<xs:element name="CO2" type="xs:55"/>
<xs:element name="Particulates" type="xs:long"/>
<xs:element name="CO" type="xs:3.33"/>
<xs:element name="HCNOx" type="xs:4.44"/>
<xs:element name="TrailerWeight" type="xs:66"/>
<xs:element name="StationaryLevel" type="xs:77"/>
<xs:element name="EngineSpeed" type="xs:88"/>
<xs:element name="DriveBynature" type="xs:99"/>
<xs:element name="SMMTFleetCode" type="xs:yel"/>
<xs:element name="Purchasercode" type="xs:4004"/>
<xs:element name="IndustryofUse" type="xs:office"/>
<xs:element name="OriginalDealerCode" type="xs:tr56"/>
<xs:element name="SellingDealerCode" type="xs:se23"/>
<xs:element name="bill110" type="xs:srira"/>
<xs:element name="bill111" type="xs:mula"/>
<xs:element name="SalesType" type="xs:krish"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I would like to update this into a a table by validating the format of the XSD file.
I will be having several similar files.
Steps I will be doing on this are
1 > Pick up file from a directory one at a time
2 > Validate the format of XSD file
3 > If valid load into a table
How can I achieve above steps using PL/SQL
Pls mail me ur suggestions on very urgent basis
Thanks in advance
Vishnu
Really this should be in the XML forum, but anyway....
Just a small question... It looks as though you are using an XML schema (XSD) to store your table information along with it's data, am I correct? Seems very bizarre thing to do.
If you are using Oracle 10g you can drop your file into the Oracle WebDAV area (XDB) and from there you can access the XML as an XMLTYPE using something like...
SELECT rv.res.extract('/Resource/Contents/*')
FROM resource_view rv
WHERE lower(rv.any_path) = lower(lc_filename)Once you have it in the XMLTYPE variable from that query, and because your schema doesn't really define the datatypes etc. it's gonna be up to you to parse the XML using something like the DBMS_XMLDOM package and process that into create table statements or something.
Certainly looks like you've got yourself a nice task to do there. Glad I'm not doing it.
;)
Similar Messages
-
Load several XSD files with ODI
would need to load several XSD files (which means I would need to create for each XSD file a new DataServer and as output a DataStore) has any- one already implemented this for a ct? as the amount of XSD might be up to ~200 I need to automate this load.
thnx, regards
mio.would need to load several XSD files (which means I would need to create for each XSD file a new DataServer and as output a DataStore) has any- one already implemented this for a ct? as the amount of XSD might be up to ~200 I need to automate this load.
thnx, regards
mio. -
How to I import Apple 'Pages' text into InDesign while keeping the formatting?
How to I import Apple 'Pages' text into InDesign while keeping the formatting?
I have imported the rtf file, but it shows up as only one line with a grey line after it, even though there are multiple lines
-
When I i port a word doc into pages it throws the format out and I cant adjust it?
when I i port a word doc into pages it throws the format out and I cant adjust it?
Pease don't say the "latest" that doesn't tell us anything.
People are always getting it wrong.
Tell us the actual version number:
Menu > Pages > About Pages
Can you select the footer? And what is in the footer?
Sometimes Word has these things in separte textboxes under other things and you need to lassoo them to get rid of them.
Peter -
Loading XML Configuration File into Java
I have a stored procedure wrapper to a Java method (within a jar file) that has been loaded into the database. I need to load an XML configuration file in this method and parse it but get the following error.
<Line 2, Column 192>: XML-24538: (Error) Can not find definition for element 'LODConfigs'
When I run the method standalone through netbeans it parses fine and is able to load the file. I've confirmed that it is able to read the file but I am lost as to what could be the problem. Any suggestions would be welcome.
The header of the file is
<?xml version="1.0" encoding="UTF-8" ?>
<LODConfigs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/spatial/network/lodLODConfigs.xsd"
xmlns="http://xmlns.oracle.com/spatial/network">
<LODConfig globalNetworkName="$DEFAULT$" networkName="$DEFAULT$">
<networkIO>
</networkIO>
</LODConfig>
</LODConfigs>Just a guess really, (and this is an old question now - so you may have moved on).. is your XML parser attempting to use the schema location to pull the XML schema from the internet?
If so, that might run fine in netbeans, but hit java permission limits in Oracle. Have you tried running it in netbeans with the network cable unplugged.
If that fails with the same error as the Oracle JVM, that might give a clue as to the problem and you can troubleshoot the permissions from there. -
LOADING x12 834 data into database and 999 generation for received x12 file
Hi All,
I'm New to BizTalk, Im using BizTalk 2010 developer edition....I need to load the x12 834 enrollment data (few details) into database. I want to know the step by step procedure to do this. kindly help me.
Also i need to know the 999 ackknowledgement generation for the received x12 file
Thanks in advance.
RengarajYou need to Generate individual 834 enrollment message through de batching in EDIReceive pipeline .
Once you get disassembled message you need map it with insert stored procedure schema for inserting data in to SQL .
For this first you need to create a table in SQL server with required columns and create a simple stored procedure to insert data in to Table . Use Add Generate Item --> consume adapter service-->SQL binding -->Outbound operation and then
select the Stored Procedure created to generate schema for it . Use the same schema while mapping from Debatched EDI message to SQL stored Procedure request.
Thanks
Abhishek -
How to load XML audit trail into an oracle table
Gents,
I have a task to load XML sys audit information into a database table.
Here is a sample audit.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Audit xmlns="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd">
<Version>11.1</Version>
<AuditRecord><Audit_Type>8</Audit_Type><EntryId>1</EntryId><Extended_Timestamp>2011-05-04T15:44:08.311370</Extended_Timestamp><DB_User>/</DB_User><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Terminal>pts/11</Terminal><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
<Sql_Text>CONNECT</Sql_Text>
</AuditRecord>
<AuditRecord><Audit_Type>4</Audit_Type><Session_Id>4294967295</Session_Id><StatementId>1</StatementId><EntryId>2</EntryId><Extended_Timestamp>2011-05-04T15:44:12.496857</Extended_Timestamp><DB_User>/</DB_User><Ext_Name>oracle</Ext_Name><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
<Sql_Text>ALTER DATABASE OPEN</Sql_Text>
</AuditRecord>
<AuditRecord><Audit_Type>4</Audit_Type><Session_Id>4294967295</Session_Id><StatementId>4</StatementId><EntryId>3</EntryId><Extended_Timestamp>2011-05-04T15:44:32.863959</Extended_Timestamp><DB_User>/</DB_User><Ext_Name>oracle</Ext_Name><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
<Sql_Text>SELECT name, value
FROM gv$parameter
WHERE name LIKE '%audit%'</Sql_Text>
</AuditRecord>
<AuditRecord><Audit_Type>4</Audit_Type><Session_Id>4294967295</Session_Id><StatementId>5</StatementId><EntryId>4</EntryId><Extended_Timestamp>2011-05-04T15:44:50.448443</Extended_Timestamp><DB_User>/</DB_User><Ext_Name>oracle</Ext_Name><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
<Sql_Text>select count(*) from v$session</Sql_Text>
</AuditRecord>
<AuditRecord><Audit_Type>4</Audit_Type><Session_Id>4294967295</Session_Id><StatementId>6</StatementId><EntryId>5</EntryId><Extended_Timestamp>2011-05-04T15:46:37.680404</Extended_Timestamp><DB_User>/</DB_User><Ext_Name>oracle</Ext_Name><OS_User>oracle</OS_User><Userhost>corpdb399d</Userhost><OS_Process>720942</OS_Process><Instance_Number>0</Instance_Number><Returncode>0</Returncode><OSPrivilege>SYSDBA</OSPrivilege>
<Sql_Text>select count(*) from v$session</Sql_Text>
</AuditRecord>
</Audit>
I am using the following code to load it:
create or replace directory test_dir as '/dbms/oracle/work/sh82993'
drop table xxrp_acct_header
create table xxrp_acct_header (
Audit_Type number,
Sql_Text varchar2(100)
DECLARE
acct_doc xmltype := xmltype( bfilename('TEST_DIR','dbmsdev_ora_720942_1.xml')
, nls_charset_id('UTF-8') );
BEGIN
insert into xxrp_acct_header (Audit_Type, Sql_Text)
select *
from xmltable(
'/Audit/AuditRecord'
passing acct_doc
columns Audit_Type path 'Audit_Type'
, Sql_Text path 'Sql_Text'
END;
COMMIT;
select * from xxrp_acct_header
However I am having problems with the <Audit .... > tag.
If a strip the rest following Audit I can get it working but if I leave the part:
xmlns="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd">
the loading will not work.
Any ideas?
All will be appreciated.
stevenodie_63 wrote:
Hi,
The XML has a default namespace, so you must declare it in XMLTable :
SELECT *
FROM XMLTable(
XMLNamespaces(default 'http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_1.xsd'),
'/Audit/AuditRecord'
passing acct_doc
columns Audit_Type number path 'Audit_Type'
, Sql_Text varchar2(100) path 'Sql_Text'
Hi ,
Can you please tell how can I load the data in the column "Extended_Timestamp" , I defined the column with datatype "TIMESTAMP" in the table but its giving error 'ORA-01830: date format picture ends before converting entire input string" .
I also tried to add a column with datatype "TIMESTAMP(6) with time Zone" but still giving the same error. What shld be the datatype of the column which will store the corresponding data from extended_timestamp or do I need to format the insert statement , if yes then how ?
Thanks. -
Load xml data to oracle database table
hi,
i am facing some problem in fetching from xml data into oracle . That if the table column name and xsl and xsd tag are equal then data is fetching .
if we we are changing column name in xsl and xsd then data is not fetching.
the soure is like that
XSD FILE
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xs:complexType>
<xs:complexType name="TRANSAC_Type">
<xs:all>
<xs:element name="NECRITUR" type="Char4_Type" minOccurs="0" nillable="false"/>
<xs:element name="NPTF_INT" type="Char2_Type" minOccurs="0" nillable="false"/>
</xs:all>
</xs:complexType>
<xs:simpleType name="Char1_Type">
<xs:restriction base="xs:string">
<xs:maxLength value="1"/>
</xs:restriction>
</xs:simpleType>
XSL FILE
<?xml version="1.0" encoding="UTF-8"?>
<xsl:output method="xml" indent="yes"/>
<!-- Treatment of fields for table -->
<xsl:template match="NECRITUR">
<NO_ECRIT_INT>
<xsl:value-of select="."/>
</NO_ECRIT_INT>
</xsl:template>
<xsl:template match="NPTF_INT">
<NPTF_INT>
<xsl:value-of select="."/>
</NPTF_INT>
</xsl:template>
</xsl:template>
</xsl:stylesheet>
Xml file
<File xmlns:xsi="http://www.’’’’’ ">
<Header>
<FileType>TRANSAC</FileType>
<FileName>TRANSAC.XML</FileName>
<CreationDate>2007-02-22</CreationDate>
<CreationTime>14:56:48</CreationTime>
</Header>
<Data>
<TRANSAC>
<NECRITUR>6</NECRITUR>
<NPTF_INT>MMMM</NPTF_INT>
</TRANSAC>
</Data>
</File>
Table Is
REP (NO_ECRIT_INT, NPTF_INT, CreationDate, CreationTime)
Regards
manu
Message was edited by:
user561683Hi Manu
Im not quite sure what your question is?
Are you trying to load data to the database or
Are you trying to retrieve data from the database ?
Either way this forum is meant for XML Publisher or BI Publisher issues not just XSL ... you might be better asking on the XML forum.
Regards, Tim -
Problem to load XML SQL Utility into other user
Hi,
I need help to load XML Utility into other user than
"scott"tiger".
I loaded both xmlparser.jar and oraclexmlsql.jar into
"scott/tiger", it works and creating functions and testing work
fine. But when change USER_PASSWORD to another user, it gave me
some errors like
creating : org/xml/sax/helpers/AttributeListImpl
Error while creating class org/xml/sax/helpers/AttributeListImpl
ORA-29506: invalid query derived from USING clause
ORA-00942: table or view does not exist
Error while accessing MD5 table
ORA-00942: table or view does not exist
Do I need create any table or view for my another oracle account?
Or did I missed any thing. From the installation instruction, I
cano not find any about creating table or view before I load the
two jar files.
Thanks
Yuping
nullHi Yuping,
Great to hear that! Thx for posting the solution to the
problem! Let us know if you have any problems with the utility
or if u need any enhancements!
Thx
Murali
Yuping Zhu (guest) wrote:
: Hi,Murali,
: The problem is fixed now. When load xmlparser into the user, it
: creates two tables automatically, my mistake is I did not grant
: "create table" privilege to the user. After I granted the
: privilege to it, it works fine.
: Thanks!
: Yuping
: Murali K (guest) wrote:
: : Hi,
: : I will check this out with the Java folks and let u know
: : Thx
: : Murali K
: : Yuping Zhu (guest) wrote:
: : : Hi, Murali
: : : I'm using Oracle8i on Solaris 2.6. When I load xmlparser
: using
: : : loadjava -resolve -verbose -user $USER_PASSWORD
xmlparser.jar
: : : I get error message and I catch part of erros
: : : PS, I can load it into scott/tiger.
: : : Thanks!
: : : Yuping
: : : loading : org/w3c/dom/html/HTMLLegendElement
: : : Error while loading org/w3c/dom/html/HTMLLegendElement
: : : ORA-04068: existing state of packages has been
discarded
: : : ORA-04063: package body "IOEXML.LOADLOBS" has errors
: : : ORA-06508: PL/SQL: could not find program unit being called
: : : ORA-06512: at line 1
: : : creating : org/w3c/dom/html/HTMLLegendElement
: : : Error while creating class
org/w3c/dom/html/HTMLLegendElement
: : : ORA-29506: invalid query derived from USING clause
: : : ORA-00942: table or view does not exist
: : : Error while accessing MD5 table
: : : ORA-00942: table or view does not exist
: : : loading : org/w3c/dom/html/HTMLImageElement
: : : Error while loading org/w3c/dom/html/HTMLImageElement
: : : ORA-04068: existing state of packages has been
discarded
: : : ORA-04063: package body "IOEXML.LOADLOBS" has errors
: : : ORA-06508: PL/SQL: could not find program unit being called
: : : ORA-06512: at line 1
: : : creating : org/w3c/dom/html/HTMLImageElement
: : : Error while creating class
org/w3c/dom/html/HTMLImageElement
: : : ORA-29506: invalid query derived from USING clause
: : : ORA-00942: table or view does not exist
: : : Error while accessing MD5 table
: : : ORA-00942: table or view does not exist
: : : loading : oracle/xml/parser/v2/XSLException
: : : Error while loading oracle/xml/parser/v2/XSLException
: : : ORA-04068: existing state of packages has been
discarded
: : : ORA-04063: package body "IOEXML.LOADLOBS" has errors
: : : ORA-06508: PL/SQL: could not find program unit being called
: : : ORA-06512: at line 1
: : : Murali K (guest) wrote:
: : : : Hi Yuping,
: : : : I tried the same on a 8i database and it seems to be
: : working
: : : : fine. (loading into two schemas). In fact I just created
: the
: : : : other user and it doesnt have any tables or anything in
it.
: : : : You do not need to create anything (table/view) extra
for
: : : these
: : : : to work.
: : : : Which database (Oracle8 or 8i) are u using?
: : : : Thanks
: : : : Murali
: : : : Yuping Zhu (guest) wrote:
: : : : : Hi,
: : : : : I need help to load XML Utility into other user than
: : : : : "scott"tiger".
: : : : : I loaded both xmlparser.jar and oraclexmlsql.jar into
: : : : : "scott/tiger", it works and creating functions and
: testing
: : : work
: : : : : fine. But when change USER_PASSWORD to another user,
it
: : gave
: : : me
: : : : : some errors like
: : : : : creating : org/xml/sax/helpers/AttributeListImpl
: : : : : Error while creating class
: : : : org/xml/sax/helpers/AttributeListImpl
: : : : : ORA-29506: invalid query derived from USING clause
: : : : : ORA-00942: table or view does not exist
: : : : : Error while accessing MD5 table
: : : : : ORA-00942: table or view does not exist
: : : : : Do I need create any table or view for my another
oracle
: : : : account?
: : : : : Or did I missed any thing. From the installation
: : instruction,
: : : I
: : : : : cano not find any about creating table or view before
I
: : load
: : : : the
: : : : : two jar files.
: : : : : Thanks
: : : : : Yuping
null -
DS 4.1 SP02 : Error when trying to import XML/XSD-Files
Hello,
i want to import a lot of XML-files with Data Services. I have a XSD file with the XML schema. I've validated the schema against the XML files with XML spy, xmllint and the result is ok. Only Data Services will run on error when i run the job:
(14.1) 06-20-14 09:34:00 (E) (8948:10636) XML-240108: |Data flow DF_Load_easybank|Reader READ MESSAGE easybank_XML_Input OUTPUT(easybank_XML_Input1)
An element named <DeviceCashInventory> present in the XML data input does not exist in the XML format used to set up this XML
source in data flow <DF_Load_easybank>. Validate your XML data.
(14.1) 06-20-14 09:34:00 (E) (8948:10636) XML-240307: |Data flow DF_Load_easybank|Reader READ MESSAGE easybank_XML_Input OUTPUT(easybank_XML_Input1)
XML parser failed: See previously displayed error message.
(14.1) 06-20-14 09:34:10 (E) (11260:10904) XML-240307: |Data flow DF_Load_easybank|Reader READ MESSAGE easybank_XML_Input OUTPUT(easybank_XML_Input1)
XML parser failed: See previously displayed error message.
In Data Service Designer i get the following error, when i try to spy into the data source with the spy-glass:
XML parser failed: See previously displayed error message.
Can anybody help me ? Many thanks in advance.
Greeting Peter & GeorgeHi there
I'd be totally surprised if this were to work. This may sound strange from the standpoint that Captivate offers a XML import option. But I believe this option is intended for importing an XML file back into Captivate that was first exported OUT of this captivate project.
XML export creates an XML file in a specific format. I think the name is XLIFF and it's intended to facilitate localizing your project into assorted languages.
Hopefully this helps... Rick
Click here for Adobe Certified Captivate and RoboHelp HTML Training
Click here for the SorcerStone Blog
Click here for RoboHelp and Captivate eBooks -
hi!
is it possible to import or export xml or xsd files from/to sap r/3?HI ,
Please see
/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
XML DOM Processing in ABAP part II - Convert an XML file into an ABAP table using SAP DOM Approach
regards,
Sathish -
Memory issue loading XML schema files
Hi,
I have an application that a startup reads available XML schema files from a folder and creates Validator objects that are put into a HashMap.
I'm running into problems creating validation schema objects when the file size of the schema is just over 30kB in size.
The following error message is given when testing with the "large" schemas:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.sun.org.apache.xerces.internal.impl.dtd.models.CMStateSet.<init>(CMStateSet.java:100)
at com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode.firstPos(CMNode.java:96)
at com.sun.org.apache.xerces.internal.impl.xs.models.XSCMBinOp.calcFirstPos(XSCMBinOp.java:136)
at com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode.firstPos(CMNode.java:97)
at com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl.getContentModel(XSComplexTypeDecl.java:185)
at com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.fullSchemaChecking(XSConstraints.java:457)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:530)
at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:206)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)
The smaller 1-10kB schemas can be stored without any problem regardless of the number I test (+1000).
The problem occurs as soon as it handles these larger schemas in the source directory. Even only one 30kB schema is enough to consume the all memory.
Below is the code uesd for creating the validation objects
for(int i=0;i<files.length;i++){
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Source schemaFile = new StreamSource(files);
schema = factory.newSchema(schemaFile); // Here is where the process fails
Validator validator = schema.newValidator();
hm.put(documentType, validator); //hm is the HashMap used as placeholder for Validator objects
Regards,
Håkan
Edited by: dezer on Jun 2, 2010 5:04 AM
Edited by: dezer on Jun 2, 2010 5:08 AMWelcome to the Sun forums.
dezer wrote:
..Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
The smaller 1-10kB schemas can be stored without any problem regardless of the number I test (+1000).
The problem occurs as soon as it handles these larger schemas in the source directory. Even only one 30kB schema is enough to consume the all memory.Are you certain that only one schema is involved? How does the code tell how many schemas there are?
Below is the code uesd for creating the validation objects
for(int i=0;i<files.length;i++){
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Source schemaFile = new StreamSource(files);
schema = factory.newSchema(schemaFile); // Here is where the process fails
Validator validator = schema.newValidator();
hm.put(documentType, validator); //hm is the HashMap used as placeholder for Validator objects
It would seem that if files.length is 10000, that would end up in around 30 times as much memory usage as for the 1000x10Kb schemas. -
LoadMovie to load xml button file... undefined
Hi, I am a designer and not familier with programming, my
fiend purchased some flash buttons with xml file, when i run its
swf its work perfect for me. there are 6 six buttons in it and i
can easily change their name from xml file.
ok here is the problem
i want to assemble those button in another file and just
those buttons to run from a different main file.
i made a movie clip container and gave it an instance name
holder_mc
on main file on frame action i wrote this
loadMovie("button.swf","holder_mc");
ok there are loading in my file but problem is that now i see
only one button now and written Undefined on the buttons.
i am not sure why they are not working , i followed many
online tutorials on loadMovie and did exactly same...
one thing is interesting see here.. without xml files are
loading perfect but with xml file i always get error even though
xml file is already in my folder.
I look forward to learn something from your experts.
thank you very much
i am using flash 8 professional. AS 2.0ok this time i made nav bar my main .. this time i am not
loading nav bar in another movie since i was really undefined error
but this time i have another xml file which is only a simple xml
file but when i click on nav bar to load another swf file which is
txt file, it loads but i don't see anything on it, no text , no
content nothing there... even though when i view it separtly it
works fine..
any help would be appreciated.
thanks -
Capture XML data payload into database table (Oracle EBS R12)
Hi All,
We have a XML Publisher report which generates output in PDF format. We want to capture the XML data payload generated by this report and put it into a DB table once the PDF is generated.
This report is generated through Oracle EBS R12 and XML Payload is stored by oracle by default in $APPLCSF/out directory.
Any pointers would be helpful
brCouple of options, this one is probably the easiest without knowing other requirements (e.g., do you have to store the output as XML, or do you just the data available so you can output in XML later?).
Capture the SQL statement that generates the output in the first place. If you have that statement, you can insert into some table using the select statement. Once you have the report data (and you can tag that particular set of data with a job ID, timestamp, whatever, in case you need to store it and distinguish it from other reports down the road), you can generate XML output using the PL/SQL built-in DBMS_XMLGEN.
Is that what you are looking for? -
I am new to oracle and new to xml... so if anyone has some suggestions on this topic I would appreciate it...
we are looking at getting data from multiple locations and multiple databases and was looking at a way to uniformly add this to the database... I was exploring the XSU utility, but I had a few questions...
We have quite a few tables that will need to be updated with data (around 100). Will we need an xml file for each table? is there a way to have an xml file so that the insert, update, and delete routines can be included in one file, or will this have to be three files... so potentially we would have 300 files to update the database?
Thanks for your time and input... let me know if you need more information.Brian,
A 100 tables would mean 100 XML-documents.
But, if source and destination table definitions differ (e.g. in column names), you will need a transformation of the XML into the (canonical) format of the destination table.
So you may have to define multiple xslt stylesheets per table for these transformations.
And something else you may need to consider:
processing a few large XML-documents takes far more time than processing many small XML-documents. Advice: keep the XML-documents small.
Maybe you are looking for
-
How do I change the number formatting within a Cell Table in Microsoft Word?
Hi, I was wondering if someone could help me out on an issue I've been having... I work for an accounting firm and we do a lot of financial statements. I was wondering if we would be able to treat a cell table in Microsoft Word 2007 like I would a c
-
Profit center wise report using MB51
Dear experts, I want to copy standard report of MB51 which is RM07DOCS. In this report I want profit center field also . Profit field exists in table MSEG. where I have to attach this field in the report RMO7DOCS. This report is heirarchical report.
-
In the update 6.0.1
When entering apple store it tells me cannot connect to iTunes and gets out the app.
-
Hello Gurus, Does any one have cook book for ISA. If you do please send it across to [email protected] Thanks in advance vamsi
-
Batch renumber and rename by time of capture
I shoot weddings with two different cameras which have been synchronized for time (hms). Does Lightroom have the capability of sorting the files by the time of capture? Or can you advise me of any other way to get them in the correct order without sp