Load XML with dynamic filename
Hi,
I am trying to create a load xml function where I can send
the filname to load to the function, however I get a syntax error
with the following function, can anyone see what is wrong here?
function loadXML(file){
myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success) {
if (success) {
// Success
} else {
// fail
myXML.load(path+file);
Thanks for your advice
I was trying to do the same thing and came across this great
tutorial. I think your syntax is just a little off.
myXML=new XML();
myXML.ignoreWhite=true;
myXML.onLoad=function(ok){
if(ok){
//trace('data loaded');
allData=this.firstChild.childNodes;
for(i=0;i<allData.length;i++){
trace(allData
.attributes.text);
}else{
trace('error');
myXML.load('gridTest.xml');
<?xml version="1.0" encoding="iso-8859-1"?>
<nav>
<but text="home">
<heading>You are at Home</heading>
<content>This is the text that is displayed when click
on home</content>
</but>
<but text="About Us">
<heading>You are at the about us
section</heading>
<content>This is the text that is displayed when click
on about us</content>
</but>
<but text="Contact"></but>
<heading>You are at Contact</heading>
<content>This is the text that is displayed when click
on Contact</content>
</nav>
Similar Messages
-
Picking files from FTP server with dynamic Filename.
Hello Experts,
I want to pick some files from a FTP server in a File to Idoc scenario. The files in the Ftp Server are created with the filenames as timestamp of the file when it was created. How do I pick up these files?
Thanks,
MerrillyHi,
The above masking concept (*.txt, . etc) will be applicable for the files with NFS only,
See the below link to apply it
/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
The below link will help you to build up the adapter module to read the dynamic file name
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/da5675d1-0301-0010-9584-f6cb18c04805
This could be applicable for FTP ...
Thanks
Swarup -
Load XML with flashvars?
Hey folks
I have a flash photo gallery that uses XML to tell the flash
what pics to load in and display. Works really great but I want to
take it a step further and be able to specify the xml file being
loaded from HTML. I guess using Flashvars unless there's another
method that works better?
in my actionscript, I have this line
xmlData.load("images.xml");
and that's telling it to load in the xml file that has the
info for all the pics
is there any way to replace that with flash vars and actually
have it work?
What we're trying to do is have a different photo gallery on
each page, and instead of making a separate flash movie & xml
for each one, we want to just have 1 "gloabal" flash movie and then
just a different xml file for each different gallery.
Anyone have any ideas how I can get it to work?
I know it's probably some easy little thing I keep missing
:(You just need to replace the file name in:
xmlData.load("images.xml"); with
your variable name, set by FlashVars. I'd suggest using
SWFObject to set the
flash var - it makes it really easy.
Example:
<script type="text/javascript">
var so = new SWFObject("gallery.swf", "gallery", "400",
"300", "8",
"#FFFFFF");
so.addVariable("xmlFile", "gallery1.xml");
so.write("flashcontent");
</script>Then in Flash:
xmlData.load(xmlFile);
http://blog.deconcept.com/swfobject/
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
How to load xml with large base64 element using sqlldr
Hi,
I am trying to load xml data onto Oracle 10gR2. I want to use standard sqlldr tool if possible.
1) I have registered my schema with succes:
- Put the 6kbytes schema into a table
- and
DECLARE
schema_txt CLOB;
BEGIN
SELECT text INTO schema_txt FROM schemas;
DBMS_XMLSCHEMA.registerschema ('uddkort.xsd', schema_txt);
END;
- Succes: I can create table like:
CREATE TABLE XmlTest OF XMLTYPE
XMLSCHEMA "uddkort.xsd"
ELEMENT "profil"
- USER_XML_TABLES shows:
TABLE_NAME,XMLSCHEMA,SCHEMA_OWNER,ELEMENT_NAME,STORAGE_TYPE
"XMLTEST","uddkort.xsd","THISE","profil","OBJECT-RELATIONAL"
2) How can I load XML data into this?
- One element of the schema is <xs:element name="billede" type="xs:base64Binary" minOccurs="0"/>
- This field in data can be 10kbytes or more
I have tried many control files - searching the net, but no luck so far.
Any suggestions?
/Claus, DK- One element of the schema is <xs:element name="billede" type="xs:base64Binary" minOccurs="0"/>
- This field in data can be 10kbytes or moreThe default mapping in Oracle for this type is RAW(2000), so not sufficient to hold 10kB+ of data.
You'll have to annotate the schema in order to specify a mapping to BLOB datatype.
Something along those lines :
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
<xs:element name="image" xdb:defaultTable="IMAGES_TABLE">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="content" type="xs:base64Binary" xdb:SQLType="BLOB"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb05sto.htm#sthref831
Then :
SQL> begin
2 dbms_xmlschema.registerSchema(
3 schemaURL => 'image.xsd',
4 schemaDoc => '<?xml version="1.0"?>
5 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
6 <xs:element name="image" xdb:defaultTable="IMAGES_TABLE">
7 <xs:complexType>
8 <xs:sequence>
9 <xs:element name="name" type="xs:string"/>
10 <xs:element name="content" type="xs:base64Binary" xdb:SQLType="BLOB"/>
11 </xs:sequence>
12 </xs:complexType>
13 </xs:element>
14 </xs:schema>',
15 local => true,
16 genTypes => true,
17 genTables => true,
18 enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
19 );
20 end;
21 /
PL/SQL procedure successfully completed
SQL> insert into images_table
2 values(
3 xmltype(bfilename('TEST_DIR', 'sample-b64.xml'), nls_charset_id('AL32UTF8'))
4 );
1 row inserted
where "sample-b64.xml" looks like :
<?xml version="1.0" encoding="UTF-8"?>
<image>
<name>Collines.jpg</name>
<content>/9j/4AAQSkZJRgABAgEBLAEsAAD/7QlMUGhvdG9zaG9wIDMuMAA4QklNA+0KUmVzb2x1dGlvbgAA
AAAQASwAAAABAAEBLAAAAAEAAThCSU0EDRhGWCBHbG9iYWwgTGlnaHRpbmcgQW5nbGUAAAAABAAA
AHg4QklNBBkSRlggR2xvYmFsIEFsdGl0dWRlAAAAAAQAAAAeOEJJTQPzC1ByaW50IEZsYWdzAAAA
O9r8FHXdH4LDSSUHoImAmcIcQPwWAkkh3ogKI404WGkkkO8Po/EpmmCYWEkkru7z/FJg9sRqsFJJ
XR3iPZMJN1HmsFJJXT6u+3UQdJUJj7lhpJKHV32dh96i3Qx8lhJJK7u9w4jw7p+SCsBJJDukQ7Tu
VM6Ln0klHo7rjEeak0rASST0f//Z</content>
</image>BTW, open question to everyone...
XMLTable or XMLQuery don't seem to work to extract the data as BLOB :
SQL> select x.image
2 from images_table t
3 , xmltable('/image' passing t.object_value
4 columns image blob path 'content'
5 ) x
6 ;
ERROR:
ORA-01486: size of array element is too large
no rows selectedhowever this is OK :
SQL> select extractvalue(t.object_value, '/image/content') from images_table t;
EXTRACTVALUE(T.OBJECT_VALUE,'/IMAGE/CONTENT')
FFD8FFE000104A46494600010201012C012C0000FFED094C50686F746F73686F7020332E30003842
494D03ED0A5265736F6C7574696F6E0000000010012C000000010001012C0000000100013842494DIs there a known restriction when dealing with LOB types?
Edited by: odie_63 on 17 nov. 2011 19:27 -
Reporting Services Auto Export to PDF on a shared location with dynamic filename
Hi Guys,
I have this ERP system that is calling a url with the Document No parameter, the link automatically converts to a PDF but comes up with the OPEN/SAVE/CANCEL box however i want to automatically save to a default location...is this possible?
Secondly i need the filename to be saved as the Paramter Name and the date.pdf in the format DocumentNo- Datetime.pdf is this also possible?
Thank you in AdvanceHi Dan,
According to your description, you want to export a report to PDF using URL access. And trying to export the report with specify name automatically without prompting the OPEN/SAVE/CANCEL box. The file name should come from the parameters of the report.
For security reasons, it is not allowed to write files on a client computer (Shared folder), except for a few pieces of information in cookies.
While using URL access to export a report, the exporting process will save the file with the report’s name automatically.
In order to export the report to a specify folder with a specify name, we can send a request to the Report Server in custom application, and then receive the data from the Report Server. In the custom application, save the data to the specify folder with the specify name in server side.
Please follow these steps to archive the target:
1. Create a C# Web application.
2. In the page_load event of a page, embed the following code:
string URL = "http://localhost/Reportserver?/AdventureWorks Sample Reports/Employee Sales Summary";
string Command = "Render";
string Format = "PDF";
//We can get values of these parameters from Request object.
string paramReportMonth = "12";
string paramReportYear = "2003";
string paramEmpID = "288";
URL = URL + "&rs:Command=" + Command + "&rs:Format=" + Format + "&ReportMonth=" + paramReportMonth + "&ReportYear=" + paramReportYear +"&EmpID=" + paramEmpID;
System.Net.HttpWebRequest Req = (System.Net.HttpWebRequest) System.Net.WebRequest.Create(URL);
Req.Credentials = System.Net.CredentialCache.DefaultCredentials;
Req.Method = "GET";
//Specify the path for saving.
string path = @"C:\" + paramEmpID + "-" + paramReportYear + "-" + paramReportMonth + @".pdf";
System.Net.WebResponse objResponse = Req.GetResponse();
System.IO.FileStream fs = new System.IO.FileStream(path, System.IO.FileMode.Create);
System.IO.Stream stream = objResponse.GetResponseStream();
byte[] buf = new byte[1024];
int len = stream.Read(buf, 0, 1024);
while (len > 0)
fs.Write(buf, 0, len);
len = stream.Read(buf, 0, 1024);
stream.Close();
fs.Close();
3. Use the URL of the above page with parameters to export a report to the specify folder with specify filename.
E.g. http://<server>/custom application/export.aspx?parameterReportYear=2003¶metermonth=12&EmpId=288
Of course, we can pass other parameters with the URL such as Format.
Please feel free to ask, if you have any more questions.
Thanks,
Jin Chen
Jin Chen - MSFT -
Export query results to flat file with dynamic filename
Hi
Can anybody can point me how to dynamic export query serults set to for example txt file using process flows in OWB.
Let say I have simple select query
select * from table1 where daterange >= sysdate -1 and daterange < sysdate
so query results will be different every day because daterange will be different. Also I would like to name txt file dynamicly as well
eg. results_20090601.txt, results_20090602.txt, results_20090603.txt
I cant see any activity in process editor to enter custom sql statment, like it is in MSSQL 2000 or 2005
thanks in advanceYou can call existing procedures from a process flow the procedure can create the filename with whatever name you desire. OWB maps with file as target can also create a file with a dynamic name defined by an expression (see here ).
Cheers
David -
Loading XML with Flashvars?
Hey folks
I have a flash photo gallery that uses XML to tell the flash
what pics to load in and display. Works really great but I want to
take it a step further and be able to specify the xml file being
loaded from HTML. I guess using Flashvars unless there's another
method that works better?
in my actionscript, I have this line
xmlData.load("images.xml");
and that's telling it to load in the xml file that has the
info for all the pics
is there any way to replace that with flash vars and actually
have it work?
What we're trying to do is have a different photo gallery on
each page, and instead of making a separate flash movie & xml
for each one, we want to just have 1 "gloabal" flash movie and then
just a different xml file for each different gallery.
Anyone have any ideas how I can get it to work?
I know it's probably some easy little thing I keep missing
:(Answered in .actionscript... try not to crosspost.
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
Csv-export with dynamic filename or include a report footer?
Hi All,
I have a question regarding the exported csv file contains a variable value as part of the file name.
I read the following thread and example from Denes here:
http://htmldb.oracle.com/pls/otn/f?p=31517:39:2021865942697087
How to generate Excel file name
I created a test page per instruction and I could successfully duplicate the effort and verified the csv file contains the variable value if I click on 'export to CSV' from the link.
However, the application I am working on is slightly different. Basically in page 1, there is a 'download' button which branches to the page 2. And in page 2, in Layout and Pagination section, the value for the Report Template is set to Export CSV. In REport Export session, I set enable CSV output to Yes and file name is: &P20_REPORT_DATE..csv. Of course, I also have a hidden item &P20_REPORT_DATE whose value gets set in page process before header. Note: in this case, the user never really see the search results on screen when they click on the 'download' button which is different from the above example.
When I run the application, the file name simply doesn't show up correctly, instead it is &P20_REPORT_DATE.csv. It appears that the value of the P20_REPORT_DATE is never set.
Also, is there any way I could include a report header or footer to indicate when the report is generated?
Your help is greatly appreciated.
Thanks,Hi all,
I'm using Application Express 3.1.1.00.09.
What I want to do is include the current date in the report filename. I created an item on Page 0 called P0_CURR_DATE, which is the value of "select current_date from dual". So, the filename I attempted to create is Vendor_&P0_CURR_DATE._report (notice the & and the . are included).
When I click the report csv report link, the popup window shows file name as Vendor__report.csv (that's two underscore characters with no characters in-between).
I think that I have figured out my problem. I originally created the item on Page 0, as "Display as Text (does not save state)". So, after I change the item to "Display as Text (saves state)", the csv report filename becomes Vendor_28-JUL-08_report.csv .
I guess that's the pitfalls of being a newbie!
Thanks to all who offered help and suggestions.
Bryan
Message was edited by:
BryanG -
Csv-export with dynamic filename ?
I'm using the report template "export: CSV" to export data to a csv-file. It works fine with a static file name. Now, I would like to have a dynamic file name for the csv-file, e.g. "ExportData_20070209.csv".
Any ideas ?Ran,
This is a procedure, which will export result of any query into a flat file in your directory:
PROCEDURE export_rep_to_bfile (
p_query IN VARCHAR2,
p_directory IN VARCHAR2,
p_filename IN VARCHAR2 DEFAULT 'export_csv.csv',
p_delimiter IN VARCHAR2 DEFAULT ';',
p_coll_name IN VARCHAR2 DEFAULT 'MY_EXP_COLL'
IS
v_file UTL_FILE.file_type;
v_column_list DBMS_SQL.desc_tab;
v_column_cursor PLS_INTEGER;
v_number_of_col PLS_INTEGER;
v_col_names VARCHAR2 (4000);
v_line VARCHAR2 (4000);
v_delimiter VARCHAR2 (100);
v_error VARCHAR2 (4000);
v_code VARCHAR2 (4000);
BEGIN
-- Get the Source Table Columns
v_column_cursor := DBMS_SQL.open_cursor;
DBMS_SQL.parse (v_column_cursor, p_query, DBMS_SQL.native);
DBMS_SQL.describe_columns (v_column_cursor,
v_number_of_col,
v_column_list
DBMS_SQL.close_cursor (v_column_cursor);
FOR i IN v_column_list.FIRST .. v_column_list.LAST
LOOP
v_col_names :=
v_col_names || p_delimiter
|| (v_column_list (i).col_name);
END LOOP;
v_col_names := LTRIM (v_col_names, ';');
v_file := UTL_FILE.fopen (p_directory, p_filename, 'W');
UTL_FILE.put_line (v_file, v_col_names);
--for ApEx when used outside of ApEx
IF htmldb_collection.collection_exists (p_collection_name => p_coll_name)
THEN
htmldb_collection.delete_collection
(p_collection_name => p_coll_name);
END IF;
htmldb_collection.create_collection_from_query
(p_collection_name => p_coll_name,
p_query => p_query
COMMIT;
v_number_of_col := 50 - v_number_of_col;
FOR i IN 1 .. v_number_of_col
LOOP
v_delimiter := v_delimiter || p_delimiter;
END LOOP;
FOR c IN (SELECT c001, c002, c003, c004, c005, c006, c007, c008, c009,
c010, c011, c012, c013, c014, c015, c016, c017, c018,
c019, c020, c021, c022, c023, c024, c025, c026, c027,
c028, c029, c030, c031, c032, c033, c034, c035, c036,
c037, c038, c039, c040, c041, c042, c043, c044, c045,
c046, c047, c048, c049, c050
FROM htmldb_collections
WHERE collection_name = p_coll_name)
LOOP
v_line :=
RTRIM ( c.c001
|| p_delimiter
|| c.c002
|| p_delimiter
|| c.c003
|| p_delimiter
|| c.c004
|| p_delimiter
|| c.c005
|| p_delimiter
|| c.c006
|| p_delimiter
|| c.c007
|| p_delimiter
|| c.c008
|| p_delimiter
|| c.c009
|| p_delimiter
|| c.c010
|| p_delimiter
|| c.c011
|| p_delimiter
|| c.c012
|| p_delimiter
|| c.c013
|| p_delimiter
|| c.c014
|| p_delimiter
|| c.c015
|| p_delimiter
|| c.c016
|| p_delimiter
|| c.c017
|| p_delimiter
|| c.c018
|| p_delimiter
|| c.c019
|| p_delimiter
|| c.c020
|| p_delimiter
|| c.c021
|| p_delimiter
|| c.c022
|| p_delimiter
|| c.c023
|| p_delimiter
|| c.c024
|| p_delimiter
|| c.c025
|| p_delimiter
|| c.c026
|| p_delimiter
|| c.c027
|| p_delimiter
|| c.c028
|| p_delimiter
|| c.c029
|| p_delimiter
|| c.c030
|| p_delimiter
|| c.c031
|| p_delimiter
|| c.c032
|| p_delimiter
|| c.c033
|| p_delimiter
|| c.c034
|| p_delimiter
|| c.c035
|| p_delimiter
|| c.c036
|| p_delimiter
|| c.c037
|| p_delimiter
|| c.c038
|| p_delimiter
|| c.c039
|| p_delimiter
|| c.c040
|| p_delimiter
|| c.c041
|| p_delimiter
|| c.c042
|| p_delimiter
|| c.c043
|| p_delimiter
|| c.c044
|| p_delimiter
|| c.c045
|| p_delimiter
|| c.c046
|| p_delimiter
|| c.c047
|| p_delimiter
|| c.c048
|| p_delimiter
|| c.c049
|| p_delimiter
|| c.c050,
v_delimiter
UTL_FILE.put_line (v_file, v_line);
END LOOP;
UTL_FILE.fclose (v_file);
IF htmldb_collection.collection_exists (p_collection_name => p_coll_name)
THEN
htmldb_collection.delete_collection
(p_collection_name => p_coll_name);
END IF;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
IF DBMS_SQL.is_open (v_column_cursor)
THEN
DBMS_SQL.close_cursor (v_column_cursor);
END IF;
v_error := SQLERRM;
v_code := SQLCODE;
raise_application_error (-20001,
'Your query is invalid!'
|| CHR (10)
|| 'SQL_ERROR: '
|| v_error
|| CHR (10)
|| 'SQL_CODE: '
|| v_code
|| CHR (10)
|| 'Please correct and try again.'
|| CHR (10)
END export_rep_to_bfile;You may adjust this to get a report query, by doing the following:
DECLARE
x VARCHAR2 (4000);
BEGIN
SELECT region_source
INTO x
FROM apex_application_page_regions
WHERE region_id = TO_NUMBER (LTRIM (p_region, 'R'))
AND page_id = p_page_id
AND application_id = p_app_id;
END;which will get your region query.
...and there you go.
Denes Kubicek -
Load XML with urlstring variables
I have a flash page flipping book that I bought at activeden. It uses an XML file to load in the images of the book to flip through. I have created a PHP file that takes an event ID and creates a custom XML file for flash. How do I have flash load an xml file like this? Instead of passing:
_xmlLoader.loadXml("setup.xml");
I would like to pass:
_xmlLoader.loadXml("setup.php?id=" + eid);
That code doesn't seem to be working for me though. Am I missing something here?Then I don't know what else to offer. As long as the xml is well formed there should be no problem, unless you are testing locally and don't have PHP processing available locally. You will be better off overall testing this on a server.
As my policy I ignore/delete private messages that involve postings. My voluntary attempts to help are strictly in the puiblic forums. -
Hi all!
I create XML and DTD. All working fine when I open it in MS XMLNotepad.
But when I try to load my XML in validating mode I get error
Error opening external DTD 'ReportsDTD.dtd'.
I open my XML through class loader as resource stream and then load it from this stream.
In XML I have such string
<!DOCTYPE DEFINITIONS SYSTEM "ReportsDTD.dtd">
Both xml and dtd are located in same directory.
Can anybody explain me whats wrong?
MikeReading from a stream, the parser has no idea what the "current directory" is.
So, when you reference a relative URL like "ReportsDTD.dtd", this means to find the DTD in the "same directory" as the current XML document.
You need to properly set the Base URL of the original input stream so that the parser knows what the base directory is.
Or, alternatively you can use getResource on the Class object that returns a URL and that has embedded within it the correct base URL "directory" info to work correctly.
So, if I have a "foo.xml" file that references "foo.dtd" inside, I can use the following code:
import java.net.URL;
import oracle.xml.parser.v2.*;
public class Class1
public static void main(String[] a) throws Throwable {
Class1 c = new Class1();
URL u = c.getClass().getResource("foo.xml");
DOMParser p = new DOMParser();
p.parse(u);
p.getDocument().print(System.out);
public Class1() { }
}Steve Muench
Development Lead, Oracle XSQL Pages Framework
Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
Author, Building Oracle XML Applications
null -
Goodmorning,
I have this XML file:
bq. <?xml version="1.0"?> \\ <Header> \\ <DocName>NOMRES</DocName> \\ <DocVersion>3.2</DocVersion> \\ <Sender>TIGF</Sender> \\ <Receiver>TIENIG</Receiver> \\ <DocNumber>120731</DocNumber> \\ <DocDate>2008-12-14T16:36:43.9288481+01:00</DocDate> \\ <DocType>J</DocType> \\ <Contract>TIGF-TIENIG</Contract> \\ </Header> \\ <ListOfGasDays> \\ <GasDay> \\ <Day>2008-12-15</Day> \\ <BusinessRuleFlag>Processed by adjacent TSO</BusinessRuleFlag> \\ <ListOfLibri> \\ <Libro> \\ <Logid>62</Logid> \\ <Isbn>88-251-7194-3</Isbn> \\ <Autore>Elisa Bertino</Autore> \\ <Titolo>Sistemi di basi di dati - Concetti e architetture</Titolo> \\ <Anno>1997</Anno> \\ <Collocazione>Dentro</Collocazione> \\ <Genere>Informatica</Genere> \\ <Lingua>Italiano</Lingua> \\ </Libro> \\ <Libro> \\ <Logid>63</Logid> \\ <Isbn>978-88-04-56981-7</Isbn> \\ <Autore>Dan Brown</Autore> \\ <Titolo>Crypto</Titolo> \\ <Anno>1998</Anno> \\ <Collocazione>Dentro</Collocazione> \\ <Genere>Thriller</Genere> \\ <Lingua>Italiano</Lingua> \\ </Libro> \\ </ListOfLibri> \\ </GasDay> \\ <GasDay> \\ <Day>2008-12-15</Day> \\ <BusinessRuleFlag>Confirmed</BusinessRuleFlag> \\ <ListOfLibri> \\ <Libro> \\ <Logid>64</Logid> \\ <Isbn>978-88-6061-131-4</Isbn> \\ <Autore>Stephen King</Autore> \\ <Titolo>Cell</Titolo> \\ <Anno>2006</Anno> \\ <Collocazione>Dentro</Collocazione> \\ <Genere>Horror</Genere> \\ <Lingua>Italiano</Lingua> \\ </Libro> \\ <Libro> \\ <Logid>65</Logid> \\ <Isbn>1-56592-697-8</Isbn> \\ <Autore>David C. Kreines</Autore> \\ <Titolo>Oracle SQL - The Essential Reference</Titolo> \\ <Anno>2000</Anno> \\ <Collocazione>Dentro</Collocazione> \\ <Genere>Informatica</Genere> \\ <Lingua>Inglese</Lingua> \\ </Libro> \\ <Libro> \\ <Logid>66</Logid> \\ <Isbn>978-88-6061-131-4</Isbn> \\ <Autore>Stephen King</Autore> \\ <Titolo>Cell</Titolo> \\ <Anno>2006</Anno> \\ <Collocazione>Dentro</Collocazione> \\ <Genere>Horror</Genere> \\ <Lingua>Italiano</Lingua> \\ </Libro> \\ </ListOfLibri> \\ </GasDay> \\ </ListOfGasDays> \\ <ListOfGeneralNotes> \\ <GeneralNote> \\ <Code>100</Code> \\ <Message>Rien a signaler</Message> \\ </GeneralNote> \\ </ListOfGeneralNotes>
and use this control file:
bq. load data \\ infile "Esempio.XML" "str '</Libro>'" \\ BADFILE "libri.bad" \\ DISCARDFILE "libri.dis" \\ DISCARDMAX 10000 \\ truncate \\ into table LIBRI \\ TRAILING NULLCOLS \\ ( \\ dummy filler terminated by '<Libro>', \\ Logid enclosed by "<Logid>" and "</Logid>", \\ Isbn enclosed by "<Isbn>" and "</Isbn>", \\ Autore enclosed by "<Autore>" and "</Autore>", \\ Titolo enclosed by "<Titolo>" and "</Titolo>", \\ Anno enclosed by "<Anno>" and "</Anno>", \\ Collocazione enclosed by "<Collocazione>" and "</Collocazione>", \\ Genere enclosed by "<Genere>" and "</Genere>", \\ Lingua enclosed by "<Lingua>" and "</Lingua>" \\ )
being uploaded but I always send error in the first record.
Someone said me why? differently if I set the control file?
thanksI have the following XML data file and had the same loading issue.
<?xml version="1.0"?>
<Settlement_Info>
<file_header>
<agency_id>129</agency_id>
<agency_form_number/>
<omb_form_number/>
<treasury_account_symbol/>
<percent_of_amount>100.00</percent_of_amount>
</file_header>
<body_item>
<item_header>
<deposit_ticket_number>001296</deposit_ticket_number>
<total_amount_of_sf215>1,318,542,280.16</total_amount_of_sf215>
<number_of_collections>3,929</number_of_collections>
<total_of_all_collections>1,318,542,280.16</total_of_all_collections>
</item_header>
<item_detail_record>
<paygov_tx_id>FMG4</paygov_tx_id>
<agency_tx_id>0000015901</agency_tx_id>
<collection_amount>8,688.70</collection_amount>
<collection_method>ACH</collection_method>
<deposit_ticket_number>96</deposit_ticket_number>
<settlement_date>12/15/2009</settlement_date>
<collection_status>SETTLED</collection_status>
<submitter_name>MORRIS</submitter_name>
</item_detail_record>
<item_detail_record>
<paygov_tx_id>FMG5</paygov_tx_id>
<agency_tx_id>0000015902</agency_tx_id>
<collection_amount>42,198.66</collection_amount>
<collection_method>ACH</collection_method>
<deposit_ticket_number>001296</deposit_ticket_number>
<settlement_date>12/15/2009</settlement_date>
<collection_status>SETTLED</collection_status>
<submitter_name>CASTLE</submitter_name>
</item_detail_record>
<item_detail_record>
<paygov_tx_id>4FMG6</paygov_tx_id>
<agency_tx_id>0000015903</agency_tx_id>
<collection_amount>57,278.25</collection_amount>
<collection_method>ACH</collection_method>
<deposit_ticket_number>001296</deposit_ticket_number>
<settlement_date>12/15/2009</settlement_date>
<collection_status>SETTLED</collection_status>
<submitter_name>FRANKLIN</submitter_name>
</item_detail_record>
</body_item>
<file_footer>
<file_name>ACHActivityFile_12152009.xml</file_name>
<file_creation_date>12/15/2009 10:08:31 AM</file_creation_date>
</file_footer>
</Settlement_Info>
Control file
load data
infile 'C:\sample1.xml' "str '</item_detail_record>'"
truncate
into table xml_test2
TRAILING NULLCOLS
dummy filler terminated by "<item_detail_record>",
paygov_tx_id enclosed by "<paygov_tx_id>" and "</paygov_tx_id>",
agency_tx_id enclosed by "<agency_tx_id>" and "</agency_tx_id>",
collection_amount enclosed by "<collection_amount>" and "</collection_amount>",
collection_method enclosed by "<collection_method>" and "</collection_method>",
deposit_ticket_number enclosed by "<deposit_ticket_number>" and "</deposit_ticket_number>",
settlement_date enclosed by "<settlement_date>" and "</settlement_date>",
collection_status enclosed by "<collection_status>" and "</collection_status>",
submitter_name enclosed by "<submitter_name>" and "</submitter_name>"
table strucutre
CREATE TABLE XML_TEST2
PAYGOV_TX_ID VARCHAR2(30 BYTE),
AGENCY_TX_ID VARCHAR2(30 BYTE),
COLLECTION_AMOUNT VARCHAR2(30 BYTE),
COLLECTION_METHOD VARCHAR2(30 BYTE),
DEPOSIT_TICKET_NUMBER VARCHAR2(30 BYTE),
SETTLEMENT_DATE VARCHAR2(30 BYTE),
COLLECTION_STATUS VARCHAR2(30 BYTE),
SUBMITTER_NAME VARCHAR2(60 BYTE)
If I reomove the <file_header> and <item_header> blocks, the control file works perfectly, otherwise it skips the first record.
thanks
Reji -
Recent Document Loader, addEventListener with dynamic functions.
I have an application which I am trying to display a list of recent documents, that you can click on to open them.
So far they display but only the last item gets the new event and works. Here is the code that I use to generate the call.
The code is attached. Its as if the code only rembers the last added eventListner. Please help, thank you!Jon,
The problem in your code where you use an unnamed callback function as the event listener:
document.getElementById('recDocName' + arrCount).addEventListener('click', function() {
OpenFile(stringName, true);},true);
Try something like this:
document.getElementById('sdf' + arrCount).addEventListener('click', clickEventListener, true);
Then define a separate clickEventListener() function that looks like this:
function clickEventListener(event) {
var targetID = event.target.id;
air.trace(targetID);
// Calculate the filename based on the targetID, possibly looking up in an Array
// Call the funciton to open the file -
XML with MTOM-Attachments for BW 7.X
Hi all,
My question is regarding loading XML with MTOM-Attachments into BW 7.X.
It is possible to load XML-Files with a push via a web service DataSource into BW 7.X. The new NetWeaver-Release 7.1 is capable of handling XML-Files with MTOM-attachments. What I do not understand is if and how the Web Service DataSource and the MTOM capabilities of NetWeaver work together.
Does the capability of NetWeaver 7.1 enable BW to handle MTOM? If it is possible to use MTOM with BW, do I need Usage Type PI to bring MTOM attachments into BW?
I have checked several links regarding MTOM, e.g.
http://help.sap.com/saphelp_nwpi71/helpdata/en/76/fc9c3d9a864aef8139d70759a499fc/frameset.htm
or
https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/fcbc97b6-0a01-0010-6594-f8208ff674f9&language=en
Unfortunately I could not find an answer to my question there.
Thanks and Regards,
FelixThanks Tammy for the quick reply. Apologies for asking this naive question but since these are planned innovations and subject to change - this means we will not get any of the following benefits if we migrate to BW 7.4 from BW 7.02 and use BO4.1 on top of it now. Yes integrated planning is not applicable to our client.
SAP BW integrated planning
SAP BW integrated planning and planning application kit support in Design Studio
Planning on SAP BW unified models in SAP BW 7.4 for Analysis Office, and Design Studio
Data connectivity (Planned Innovation)
Direct data access to SAP BW for Lumira
User experience
BW integrated planning for Design Studio support
Lumira integration with SAP applications -
Loading XML file with missing elements dynamically through ODI
Hi Guys ,
I have the below xml file with two nodes Employee and Address. On a daily basis , sometimes the address element might not come in from the source xml file , but my interface has columns mapped to address elements, and hence it can fail due to the source element not being found in the file or data might not get loaded due to the 'and' condition in the sql query 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 the elements (Employee) present and load data only for those elements dynamically?
XML File:
<?xml version="1.0" encoding="UTF-8" ?>
<EMP>
<Empsch>
<Employee>
<EmployeeID>12345</EmployeeID>
<Initials>t</Initials>
<LastName>john</LastName>
<FirstName>doe</FirstName>
</Employee>
<Address>
<WorkPhone>12345</WorkPhone>
<WorkAddress>Test 234</WorkAddress>
</Address>
</Empsch>
</EMP>
Thanks ,
Revanth TambisettyI was able to resolve it by using left outer joins and referring the table structure from the XSD
Maybe you are looking for
-
Jabber cannot Call - Integration with CUCM/AD
Dear all, I installed CUCM 9.1.1 and CUPS 9.1.1 with Jabber client 9.0.1. when I run Jabber on a joined domain PC (login with AD username and password), there are no problem with the calling ability. But when I try to use a non-join domain PC (I am u
-
I'm trying to download apps , it's keeps coming up with "cannot connect to iTunes Store" any ideas on a resolution ?
-
Hi, I've this problem using BW 7.0: When I try to load some data from a table, the system find a greek character (µ) and it stop the data loading. The error's message is this: "Record 982 :0UNIT : Data record 982 ('0CSQA0787 '): Version 'µM ' is not
-
How to use max of function in mapping?
hi all: SQL: select max(var1) from tab1, insert tab2(var1,...) values(var1,...), move a rowset of max var1 from tab1 to tab2, how to do in mapping?
-
Set color of inactive elements
Hii all I have a table layout form I have a field which called status(T ,I, O) When i click a button the status of those elements which satisfy a condition is changed to T and the elements with status T are disabled now i want to change the color of