Generate a single XML file of the multiple JDBC result set
HelloI need to create a single XML file of the multiple result set. The code below is to generate a XML signle leave a single result set, but suppose we have five different tables in the same database and the tables aren't relalted to the other.
for example: select * from SAMPLE_PRODUCT
Select * command
Select * LOGISTICS... and many others.
You can create multiple sets of results by top queries but how can write all values using a JDBC result set in a single xml file? Help, please.
a signle file xml from one generator result
import java.io.StringWriter;
import java.sql.Connection;
to import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
Import javax.xml.parsers.DocumentBuilder;
Import javax.xml.parsers.DocumentBuilderFactory;
Import javax.xml.transform.OutputKeys.
Import javax.xml.transform.Transformer;
Import javax.xml.transform.TransformerFactory;
Import javax.xml.transform.dom.DOMSource;
Import javax.xml.transform.stream.StreamResult;
to import org.W3C.DOM.document;
Import org.w3c.dom.Element;
public class JDBCToXML {}
Public Shared Sub main (string args []) throws Exception {}
DocumentBuilderFactory plant = DocumentBuilderFactory.newInstance ();
DocumentBuilder builder = factory.newDocumentBuilder ();
Doc document = builder.newDocument ();
Element results = doc.createElement ("Results");
doc.appendChild (results);
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager
.getConnection("jdbc:odbc:RIS","USER","USER");
ResultSet rs = con.createStatement () .executeQuery ("select * from SAMPLE_PRODUCT");
ResultSetMetaData rsmd = rs.getMetaData ();
int colCount = rsmd.getColumnCount ();
While (RS. Next {}
Element line = doc.createElement ("Row");
results.appendChild (row);
for (int i = 1; i < = colCount; i ++) {}
String columnName = rsmd.getColumnName (i);
Object value = rs.getObject (i);
Element node = doc.createElement (columnName);
node.appendChild (doc.createTextNode (value.toString (()));
row.appendChild (node);
}
}
DOMSource domSource = new DOMSource (doc);
TransformerFactory tf = TransformerFactory.newInstance ();
Transformer transformer = tf.newTransformer ();
transformer.setOutputProperty (OutputKeys.OMIT_XML_DECLARATION, 'yes');
transformer.setOutputProperty (OutputKeys.METHOD, "xml");
transformer.setOutputProperty (OutputKeys.ENCODING, "ISO-8859-1");
StringWriter sw = new StringWriter();
StreamResult sr = new StreamResult (sw);
transform. Transform (domSource, sr);
System.out.println (SW. ToString());
con. Close;
RS. Close();
}
}
Thank you
Sumit
Published by: user8687839 on April 4, 2012 23:04
Published by: user8687839 on April 4, 2012 23:09
As EJP says, you really want to get the data in a single request, if possible (and I don't see why that shouldn't be the case).
In fact, you really want to get this query to return the data as close the format you need as you can.
If you did this on Oracle, for example, I'd get Oracle to produce XML that you can then turn (assuming that you could not itself produce the XML you want directly).
In your case, using some db (access?), and then just get the line structure such as the conversion to XML involves the least amount of faffing about.
Rethink the SQL and the rest should be easy.
Tags: Java
Similar Questions
-
XML format for the export of result set by the user
Hello
I would like to export my entire test sequence results in a new XML file. The format of the XML file is given and fixed.
My first attempt was to create a LabView VI to export data in XML format.
I read that there is no way to set the format with the standard version of LabView. But I have a suspicion that there is an upgrade so I can set the XML format by myself.
Does anyone know what update I need?
Or did someone knows how to export XML in a different way?
Thanks for your help!
You're right that the current implementation does not do.
You have two options:
1. create your own plugin that analyzes your resultlist and generates the XML file
2. create something late MainSequence which analyses the resultlist and generates the XML file
It depends on the scope of your project. If there is one thing to type 1 and then option 2 would be easier. If it's something, you use through multiple tests and then I'd go with Option 1.
In both cases, you must go to analyze thorugh the results list and generate code for XML. I recommend keeping the algorithm in TestStand to browse the resultlist. It is much easier and simpler. Simply create a sous-suite that does and pass the list of results.
Kind regards
-
Store XML in the schema issue generated tables and XML Validation against the schema.
Hello friends,
I am facing a problem where to store xml in a saved schema generated from tables.
It's my diagram
--
<? XML version = "1.0" encoding = "UTF-8"? >
" < xs: schema xmlns:ds = ' http://www.w3.org/2000/09/xmldsig# "" xmlns: XS = " " http://www.w3.org/2001/XMLSchema "xmlns =" " http://www.ABC.inf.in/test "targetNamespace =" " http://www.abc.inf.in/test" elementFormDefault = "qualified" attributeFormDefault = "unqualified" > "
< xs: include schemaLocation = "abc.xsd" / >
< xs: element name = "project" type = 'student' >
< xs: annotation >
< Intention > it is a Documentation < / intention >
< / xs: annotation >
< / xs: element >
< / xs: Schema >
-This is my xml document
"< project versão ="2.00"xmlns ="http://www.abc.inf.in/test">."
"< test xmlns ="http://www.abc.inf.in/test">."
" < intest version ="2.00"Id ="testabc"xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance " >
< ide >
< cUF > 35 < / cUF >
< cNF > 59386422 < / cNF >
< natOp > This is post < / natOp >
< indPag > 1 < / indPag >
< mod > 55 < / mod >
< set > 1 < / series >
< / ide >...
.....................
Giving not complete because it is too long.
1. I registered successfully of the schemas in the database
2. then I generate the saved schema table
2. in my java code I have validated the document XML schema compared and it's valid successfully.
3 but when I recorded this XML file in the generated table there me gives error
As:
INSERT INTO XMLTABLE
VALUES
(XMLTYPE (bfilename('MYDIR','testabc.xml'), NLS_CHARSET_ID ('AL32UTF8')))
Error report:
SQL error: ORA-31061: error XDB: XML error event
ORA-19202: an error has occurred in the processing of XML
LSX-00333: literal '94032000' is not valid with regard to the model
And I have to store this xml in tables of this so what I have to do?
Thanks for your reply odie_63.
I got this my solution for the error. My XML document is not well structured based on my registered XML schema.
Average in My XML Document is an invalid value and which do not match my schema model so it gives this error
SQL error: ORA-31061: error XDB: XML error event
ORA-19202: an error has occurred in the processing of XML
LSX-00333: literal '94032000' is not valid with regard to the model
For the Solution, we have two ways
1. I changed this literal value "94032000" in my xml file, then save it.
2.
-To delete this schema can
-We need to change the schema for the particular element model
like: -.
-then to store xml in the database, it works...
Thank you.
-
How can I parse the XML file using the Oracle's Sql query.
Hi all
I have an XML file that must analyze and display the result according to the following example
Can you please recommend me an approach to get the result.
For example, here is my XML:
<? XML version = "1.0" encoding = "UTF-8"? >
< xmlns:pi = "urn:com.workday / picof pi: Extract_Employees" >
< IP: employee >
< Additional_Information: pi > < pi: pi function: PriorValue = "" > Intern - masteri¿½s < / pi: function >
< / pi: Additional_Information >
< / pi: employee >
< / pi: Extract_Employees >
Databases:
Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - production
SQL > SELECT * FROM NLS_DATABASE_PARAMETERS;
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS.,.
WE8ISO8859P1 NLS_CHARACTERSET
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI. SSXFF AM
NLS_TIMESTAMP_FORMAT-DD-MON-RR HH.MI. SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI. SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI. SSXFF AM TZR
NLS_DUAL_CURRENCY $
BINARY NLS_COMP
NLS_LENGTH_SEMANTICS BYTES
NLS_NCHAR_CONV_EXCP FAKE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.2.0.3.0
The Xml file above with UTF-8 character sets which is multi bytes.
But in my character database is WE8ISO8859P1 for example ISO-8859-1 (single-byte character set)
SQL > SELECT extractValue (Value (x) ', ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof ' ')
TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))
which gives the following error:
Error:
ORA-31011: XML parsing failed
ORA-19202: an error has occurred in the processing of XML
LPX-00200: could not convert from UTF-8 encoding to ISO-8859-1
Error on line 1
ORA-06512: at "SYS." XMLTYPE", line 295
ORA-06512: at line 1
Also I tried with this
SQL > SELECT convert (extractValue (Value (x), ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof"'),'WE8ISO8859P1 ', 'UTF8'))
TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))
The same error is according to the above error message.
Please help in this regard.
Thank you and best regards,
SandrineYou know the code of real character behind "" or you receive the file like that?
For the record, "" is the wildcard of UTF-8 (0xEFBFBD), so that the original character of the means has already been replaced and that very probably the file was not coded properly in the first place.
With respect to the resolution of the problem, try another method to read the file:
SQL> select value from nls_database_parameters where parameter = 'NLS_CHARACTERSET'; VALUE ---------------------------------------- WE8ISO8859P15 SQL> SELECT x.* 2 FROM XMLTable( 3 XMLNamespaces(default 'urn:com.workday/picof') 4 , '/Extract_Employees/Employee' 5 passing xmltype( 6 dbms_xslprocessor.read2clob( 7 'COP_DIR' 8 , 'XML_Issue_227176.xml' 9 , nls_charset_id('AL32UTF8') 10 ) 11 ) 12 columns job_title varchar2(30) path 'Additional_Information/Job_Title' 13 ) x 14 ; JOB_TITLE ------------------------------ Intern - Master¿s
-
RSS feeds save in the xml file in the device memory
Hello
I'm in the analysis of an RSS feed with SAX parser. Now, I want to record the first RSS an xml file in the memory of the device or on the SD card. Can someone guide me through this process
To write in an XML rss content, start by creating the file with the extension ".xml" with the help of the FileConnection API, then write content (rss data) in the XML file.
You can use code below to write the content in the file. We must give the path as a string & content in byte format.
public boolean writeFile(String path, byte[] data) { javax.microedition.io.Connection c = null; java.io.OutputStream os = null; try { c = javax.microedition.io.Connector.open("file:///" + path, javax.microedition.io.Connector.READ_WRITE); javax.microedition.io.file.FileConnection fc = (javax.microedition.io.file.FileConnection) c; if (!fc.exists()) fc.create(); else fc.truncate(0); os = fc.openOutputStream(); os.write(data); os.flush(); return true; } catch (Exception e) { return false; } finally { try { if (os != null) os.close(); if (c != null) c.close(); } catch (Exception ex) { ex.printStackTrace(); } } }
-
Combine files into a single PDF file from the button create
I use Adobe Acrobat 10.1.13 and try to Combine files into a single PDF file of the Create button. There are four leader types .pdf .doc .xls .dwg the only file that appears in the combine the dialog box is the .pdf
You will need Acrobat Pro to accomplish the task.
Acrobat Standard can only combine PDF files.
Be well...
-
Approach to analyze the large number of XML files in the relational table.
We are studying the possibility of XML DB to treat a large number of files from same day.
The goal is to parse the XML file and store it in several relational tables. Once in the relational table don't care us about the XML file.
The file cannot be stored on the file server and must be stored in a table before analysing because of security concerns. A third-party system will send the file and it will store in the XML database.
The file size can be between 1 MB to 50MB and high performance is very that much is expected of other wise men, that the solution will be discarded.
Although we have no of XSD, the XML file is well structured. We are 11g Release 2.
Based on the reading, that's what my approach.
1. CREATE THE DONNEES_XML TABLE
(xml_col XMLTYPE)
XMLTYPE xml_col STORE AS BINARY XML NAVIGATION;
2. third will store the data in the donnees_xml table.
3. create XMLINDEX on the unique XML element
4 create XMLTYPE views
CREATE OR REPLACE FORCE VIEW (V_XML_DATA)
SType,
Mtype,
MNAME,
ROT
)
AS
SELECT x."Stype"
x."Mtype."
x."Mname"
x."ROT".
OF data_table t,.
XMLTABLE)
' / SectionMain'
PASSAGE t.data
COLUMNS Stype VARCHAR2 (30) PATH "Stype"
Mtype VARCHAR2 (3) path "Mtype."
MNAME VARCHAR2 (30) PATH "MNAME"
ROT VARCHAR2 (30) PATH "OID") x;
5. loading mass analysis of data in the staging table based on the column in the index.
Please comment on the process that precedes any suggestions that can improve the performance.
Thank you
AnuragTPASSAGE t.xml_col<--WHAT will="" passing="" here="" since="" no="">--WHAT>
If you are using an XMLType Table, instead of an XMLType column reference, you are referring to the contents of XMLType while using the NICKNAME "OBJECT_VALUE" column
If--> t.object_value
-
Error loading XML file in the column of XMLTYPE through SQL loader
Hi gurus,
I am trying to load the XML file into the column of XMLTYPE through SQL Loader but the errors themselves. Here are the details
Databases
The table structureSQL*Plus: Release 10.2.0.3.0 - Production on Tue Jul 24 17:17:55 2012 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Release 10.2.0.3.0 - 64bit Production BANNER ---------------------------------------------------------------- Oracle Database 10g Release 10.2.0.3.0 - 64bit Production PL/SQL Release 10.2.0.3.0 - Production CORE 10.2.0.3.0 Production TNS for Linux: Version 10.2.0.3.0 - Production NLSRTL Version 10.2.0.3.0 - Production
XML (simple.xml) fileCREATE TABLE TH_XML ( COL_ID_1 VARCHAR2(100 BYTE), IN_FILE_1 XMLTYPE ) XMLTYPE IN_FILE_1 STORE AS CLOB (TABLESPACE SMDAT)
Control file<?xml version="1.0"?> <catalog> <book id="bk101"> <author>Some Author1</author> <title>Some Title1</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>creating applications</description> </book> <book id="bk112"> <author>Some Author2</author> <title>Some Title2</title> <genre>Computer</genre> <price>49.95</price> <publish_date>2001-04-16</publish_date> <description>Microsoft Visual Studio 7 is explored in depth</description> </book> </catalog>
LOG fileLOAD DATA INFILE 'c:\simple.xml' APPEND INTO TABLE TH_XML XMLTYPE(in_file_1) ( col_id_1 filler CHAR (100), in_file_1 LOBFILE(CONSTANT "c:\simple.xml") TERMINATED BY EOF )
I get error ORA-00904: "SYS_NC_ROWINFO$": invalid identifier in the logfile (mentioned above). Could someone help me know where I am doing wrong?SQL*Loader: Release 10.2.0.3.0 - Production on Tue Jul 24 16:42:25 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Control File: c:\my_file.ctl Data File: c:\simple.xml Bad File: c:\simple.bad Discard File: none specified (Allow all discards) Number to load: ALL Number to skip: 0 Errors allowed: 50 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Table TH_XML, loaded from every logical record. Insert option in effect for this table: APPEND Column Name Position Len Term Encl Datatype ------------------------------ ---------- ----- ---- ---- --------------------- COL_ID_1 FIRST 100 CHARACTER (FILLER FIELD) IN_FILE_1 DERIVED * EOF CHARACTER Static LOBFILE. Filename is c:\simple.xml Record 1: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 2: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 3: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 4: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 5: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 6: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 7: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 8: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 9: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 10: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 11: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 12: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 13: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 14: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 15: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 16: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 17: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 18: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 19: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 20: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 21: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 22: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 23: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Table TH_XML: 0 Rows successfully loaded. 23 Rows not loaded due to data errors. 0 Rows not loaded because all WHEN clauses were failed. 0 Rows not loaded because all fields were null. Space allocated for bind array: 256 bytes(64 rows) Read buffer bytes: 1048576 Total logical records skipped: 0 Total logical records read: 23 Total logical records rejected: 23 Total logical records discarded: 0 Run began on Tue Jul 24 16:42:25 2012 Run ended on Tue Jul 24 16:42:26 2012 Elapsed time was: 00:00:00.23 CPU time was: 00:00:00.05
Thanks in advance.
Published by: 876991 on 24 July 2012 14:18Hello
This remove the control file:
XMLTYPE(in_file_1)
It is used only if the target table is an array of XMLType object.
For an XMLType column LOBFILE is sufficient, for example:
LOAD DATA INFILE * APPEND INTO TABLE TH_XML ( col_id_1 CHAR (100), in_file_1 LOBFILE(CONSTANT "c:\simple.xml") TERMINATED BY EOF ) begindata MYID1
It tells SQL * Loader data consisting of one record with COL_ID_1 = "MYID1" and content = "c:\simple.xml" IN_FILE_1
SQL> CREATE TABLE TH_XML 2 ( 3 COL_ID_1 VARCHAR2(100 BYTE), 4 IN_FILE_1 XMLTYPE 5 ); Table created. SQL> host sqlldr control=test.ctl Username:dev Password: SQL*Loader: Release 11.2.0.2.0 - Production on Mer. Juil. 25 01:30:46 2012 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Commit point reached - logical record count 1 SQL> set long 5000 SQL> column col_id_1 format a15 SQL> select * from th_xml; COL_ID_1 IN_FILE_1 --------------- -------------------------------------------------------------------------------- MYID1
Some Author1 Some Title1 Computer 44.95 2000-10-01 creating applications Some Author2 Some Title2 Computer 49.95 2001-04-16 Microsoft Visual Studio 7 is explored in depth -
Export release build, not including data XML files in the apk package
Hi, all.
I have a flash pro project I packed for AIR according to these steps:
There are two differences:
- I am loading XML from right next to the swf files
- The Flash Pro project and the project Mobile share a directory that is outside of these two projects (this was the workflow already established in the public Service, given that several sovereign wealth funds share the same XML file).
When I test this on my phone, it adds the XML files to the apk and everything works great. The problem I have is that the export Release Build does not include XML files, and I don't see anything in the Flash Builder interface that looks like it will allow me to add more files than the swf file and the app.xml.
What Miss me?
Love - your comments helped me to think about this and get to the essential part that missed me. I've marked it useful, because it has shown the way.
I'm not a big fan of scoring own "correct" answers, but I'll do this time so that people can easily find the steps.
The error I thought that the "Debug on the device" was wrong to get an AIR debug version, because the swf file was not a debug swf.
I did not understand that if I clicked on the button run, it would also be a version out to push to the unit, and that this version would not give the message "waiting to connect to the debugger.
The entire process that you get when you click on 'Run' is a little weird (I say this to those who have never tried). It will install the application on the device, but does not launch (I think that this is impossible). Flash Builder crashes and then in "Installation application to the device. If you look at the screen, you will see a new download in your notifications bar, and from here you can launch the application.
To summarize:
- To start your swf Flash Pro package for Air using Flash Builder, follow the steps in Renaun (http://renaun.com/blog/2011/09/using-flash-builders-mobile-workflow-with-flash-professiona l-projects /)
- Doing this work on Mobile, you have probably installed on your phone in debug version. This uninstall using Astro File Manager (https://play.google.com/store/apps/details?id=com.metago.astro&hl=en)
- Instead click the "Debug" button in Flash Builder, click on 'run '. This makes an apk without debugging and pushed back them to your phone (if your Setup allows debugging of the device).
Additional notes: If you have xml files that are packaged in the apk file and you are using URLLoader (because the app originated as a web application), add "app: /" at the beginning of the URL string you use. Thus, "xml/myFile.xml" becomes "app:/xml/myFile.xml". If you need to keep your original web application logic, add a conditional on Capabilities.playerType == "Desktop. »
Hope this helps someone else with the same problems
-
Is it possible to export the RPD as a single xml file?
Hello
I tried to export the RPD in xml file, it seems I'm getting mutiple files and multiple xml file, is there an option in OBI for the consolidated xml file?
Please help me on this query.
Thank you!
Serge
Is actually the SPR at this very spot? That is C:\Temp\SampleAppLite.rpd?
I have exactly the same and it works like a charm
-
Save the XML code that is generated in an XML file
The following code creates an XML object and the function executes a query from Salesforce and fills the XML object with the results.
How would I go about recording these XML data in a file, say "data / devNotes.xml"?
[Bindable]
private var myDevNotes:XML = < notes > < / notes >;
private function loadDevNotes (): void
{
Request deleted for brevity code
for (var j: int = 0; j < qr.records.length; j ++)
{
var newNote:XML =
< notes sfid = {qr.records [j]. ID} >
< name > {qr.records [j]. Name} < / name >
< detail > {qr.records [j]. QA_Detail__c} < / details >
< createdBy > {qr.records [j]. CreatedById} < / createdBy >
< lastModified > {qr.records [j]. LastModifiedDate} < / lastModified >
< / note >;
myDevNotes = myDevNotes.appendChild (newNote);
}
}In the AIR, there is quite a bit easier to do what you want. Here is a code example:
private function save_xmlData (): void {}
var xmlFile:File = File.applicationStorageDirectory; File.documentsDirectory or File.desktopDirectory
(xmlFile = xmlFile.resolvePath('data/devNotes.xml"');
var outputString:String = myDevNotes.toXMLString ();
outputString = outputString.replace (/ \n/g, File.lineEnding);
var stream: FileStream = new FileStream();
Stream.Open (xmlFile, FileMode.WRITE);
stream.writeUTFBytes (outputString);
Stream.Close ();
}Vygo
-
Combining three versions in a single backup file using the batch client/config file
Hello again,
Is there anyway to get three versions in a single backup file using a config file and the batch client, currently we have this Configuration file:
[General]
Operation = Multiple
Username =
Password =
URL = net. TCP://localhost: 5210, Oracle, Drm, ProcessManager
LogFileName=D:\DRM\VIPTBAU\LOG_FILES\logfile.log
[Activities]
OperationCount = 3
Operation1 = VIP_DIMENSIONS
Operation2 = ACCOUNT_RF
Existence3 = ACCOUNT_BS
[VIP_DIMENSIONS]
Operation = Backupversiontofile
Connection = MONTH_END_BACKUP
VersionAbbrev = TESTPROJ_VIP_DIMENSIONS
filename = VIP_DIMENSIONS
[ACCOUNT_RF]
Operation = Backupversiontofile
Connection = MONTH_END_BACKUP
VersionAbbrev = TESTPROJ_RF_ACCOUNT
filename = VIP_DIMENSIONS
[ACCOUNT_BS]
Operation = Backupversiontofile
Connection = MONTH_END_BACKUP
VersionAbbrev = TESTPROJ_BS_ACCOUNT
filename = VIP_DIMENSIONS
which generates three separate files. We tried using a single operation and listing the 3 times of the VersionAbbrev, but that didn't work and also list the 3 versions in a VersionAbbrev.
If anyone has any ideas they would be greatly appreciated
See you soon
Chris
DRM client batch supports export several versions of a single file and restore it back. You must specify the defined version name and the delimiter.
You can configure the cfg below the backup file
[General]
Operation = Multiple
Username =
Password =
URL = net. TCP://localhost: 5210, Oracle, Drm, ProcessManager
LogFileName=D:\DRM\VIPTBAU\LOG_FILES\logfile.log
[Activities]
OperationCount = 1
OP1 = VIP_DIMENSIONS
[VIP_DIMENSIONS]
Operation = Backupversiontofile
Connection = MONTH_END_BACKUP
VersionAbbrev = TESTPROJ_VIP_DIMENSIONS, TESTPROJ_RF_ACCOUNT, TESTPROJ_BS_ACCOUNT
filename = VIP_DIMENSIONS
Delimiter = comma
to restore
[VIP_DIMENSIONS]
Operation = RestoreVersionFromFile
Connection = MONTH_END_BACKUP
SourceVersionAbbrev = TESTPROJ_VIP_DIMENSIONS, TESTPROJ_RF_ACCOUNT, TESTPROJ_BS_ACCOUNT
TargetVersionAbbrev = TESTPROJ_VIP_DIMENSIONS, TESTPROJ_RF_ACCOUNT, TESTPROJ_BS_ACCOUNT
filename = VIP_DIMENSIONS
Delimiter = comma
Try it tested and it works very well
-
Loading the XML file with the missing elements dynamically by ODI
Hi guys,.
I have the XML with two nodes Employee and address below. On a daily basis, sometimes the address element might not come from the source xml file, but my interface has columns mapped to the elements of the address, and that is why it may fail because of the source element is not found in the file or data could not get charged because the State 'and' in the sql query that is generated between the employee and address elements. Is there a way where I can load the data dynamically where I can search in the file only for items (used) present and dynamically loading data only for these items?
XML file:
<? XML version = "1.0" encoding = "UTF-8"? >
< EMP >
< Empsch >
< employee >
< EmployeeID 12345 > < / EmployeeID >
< original > t < / initials >
John < name > < / LastName >
DOE < FirstName > < / name >
< / employee >
< address >
< > 12345 as WorkPhone < / as WorkPhone >
< WorkAddress > test 234 < / WorkAddress >
< / address >
< / Empsch >
< / EMP >
Thank you
Fabien Tambisetty
I managed to solve it by using left outer joins, and in referring to the structure of the table of the XSD
-
Create an xml file using the .xsd file
Hi guys,.
Version of DB: Oracle 11g
I was wondering if I had any package that can create a xml file based on a (built-in) .xsd file. I searched but did not find any resource on the internet specific to my problem. Let's say I have an .xsd file. It is possible to load a schema and generate the XML that conform to the .xsd file using sql? If so, I want to store in a CLOB variable.
Please point me to the right direction.
Thank you.
Hello
No, there is no such functionality yet.
To build the XML "manually", according to the XSD, for example using SQL/XML functions (XMLElement, XMLAttributes, and XMLAgg etc.).
-
He had to create to my XML file in the XSL file
Hello world
This is the first time that I post my question here in the XML section, in fact I have a XML file as
Now when I retrieve data from this XML file so I need to get the root node in the Dept and 1 node as DeptRow and item as an identifier.<root_node> <node_1> <element>abc</element> </node_1> </root_node>
While she will look like when I will actually try recover data
So for this I need to use Transform method in java and generate an XSL file that can convert data according to my needs without modifying the original file.<Dept> <DeptRow> <Id>abc</Id> </DeptRow> </Dept>
then may - does anyone know what content must exist in the XSL file.
your help would be appreciated too
Thank you
FIZZZ...See a tutorial XSLT.
http://XML.sys-con.com/node/48763
Maybe you are looking for
-
The latest version of Firefox is compatible with HP Simplepass?
Since I've upgraded to Firefox 14, HP Simplepass does not work. Can someone help me with this problem? Thank you!
-
Satellite Pro A120 (PSAC1E-05E01FIT) - fan always to the maximum. Speed
Hello, in this laptop now I istalled this CPU: Intel Core Duo (Yonah) [email protected] and it's OK. This morning, I tried to replace the processor with this: Intel Core 2 Duo Mobile T7200 (Merom) processor.Works from pc but didn't enter the BIOS, the f
-
High temperature on my Satellite A100-159
Hello I have my laptop almost 5 months now and this week it crashed during a game, and I had to wait until it has been cooled before that I could start him again. Since then, I have installed speedfan to check the temperature when I'm just on the net
-
TV &; movies - watching tv on vista, the audio and video are out of sync
Watch TV on the movement and sound of vista when does not
-
BlackBerry Z10 Cant send messages Facebook of the Hub
Hello I can receive messages Facebook to my hub, but when I replied to my message disappears and it shows I send a blank message with a red and white clock block next to it (where the box or sign of delivery would be left). If I leave the hub and do