Generating "XSD" from an "XML" file
Hi,
I want a java program through which we can generate an "XSD" for
the given "XML" file.
I don't want any ready to use tools or ide's.
Please send me links or code if exists.
Thank You.
http://forum.java.sun.com/thread.jspa?threadID=491512&messageID=2314233
Similar Messages
-
Is there any way to generate pdf from an xml file using single java class
i m working on generating a pdf file from an xml file. i want to use only a single java class to do so. if theres any such code available please help me to find out.
Thanks
Gurpreet Singhexactly,
here are some libraries which are open sources;
http://java-source.net/open-source/pdf-libraries hope it's useful. :D -
How to generate GUI code from parsed XML file?
hai,
I have to generate GUI code after parsing any configuration XML file as input.Now i have parsed my XML file and got its attributed and i want to get some idea of how to map the parsed XML attributes to the java code to build GUI code.Hello,
1. I like to create data type from a XML file structure, which contains the data structure ?
XML fields will need to be taken note of to see which is repeating or not. You can also load the XML into a third-party tool such as Altova XML Spy and then generate an XSD from there. You will need to import the XSDs into PI under external definitions. However, this does not guarantee business interoperability, as such, it is always best to ask the provider for the XSDs or WSDL. It will also save you a lot of time from guessing which fields are needed or not.
2. How to create custom node function in graphical mapping editor ?
In your graphical mapping editor, on the lowest left corner, there is an icon there that says Create New Function. You must take into account their return types:
1. Single Values = String
2. Queue/Context (no return type) thus resultList is used.
Hope this helps,
Mark -
Creation of a shipping notification for a PO in EBP from a XML file via XI.
Hi everybody.
We are trying to create a shipping notification for a Purchase Order in Enterprise Buyer from a XML file via XI.
For to do it, we are using DespatchedDeliveryNotification_In message interface (transaction SPROXY).
But when we execute it, the system show us next message:
"An error occured within an XI interface: An exception with the type CX_GDT_CONVERSION occurred, but was neither handled locally, nor declared in a RAISING clause Programm: SAPLBBP_BD_MAPPING_SAPXML1; Include: LBBP_BD_MAPPING_SAPXML1F5B; Line: 4"
No more information is available.
Is there any additional transaction to see more information about the error message?
Is there any documentation about this XML file, mandatory fields, examples ?
We populated some fields in our XML file, but we do not know if the problem is with mandatory fields, data, program error
I will thank for any information
Thanks in advance.
Raúl Moncada.Raúl,
This is because of the inbound UOM.
The include LBBP_BD_MAPPING_SAPXML1F5B is in charge of mapping the item Unit Of Mesure (UOM) sent in the ASN XML file (it should be an ISO code).
You can test FM UNIT_OF_MEASURE_ISO_TO_SAP with this inbound ISO code.
PS: you should create an OSS message so the mapping sends back an error message instead of generating an uncatched exception (that generates a dump).
Rgds
Christophe
PS: please reward points for helpfull answers -
CA - Error when trying to generate an amended RL1 XML file
Dear Community,
In case you try to generate an amended RL1 XML file and you get the error "Element content is invalid according to the DTD/Schema", it means the system incorrectly missed the tag corresponding to Box O. If you are facing this issue please access the wiki page below, which points to a FAQ in PY-CA, where you will be able to find how to solve it.
http://wiki.sdn.sap.com/wiki/display/ERPHCM/FAQinPY-CA
BTW, we created the question/answer from a suggestion of a customer who faced this issue before and believes through this way more people can find help and solve their issues quickly. Suggestions like this are more than welcome. Thanks for that!
Kind regards.
Felipe GrandiHello All
Those who are facing the DE9 SUI XML download issue for CA. I created the very high priority OSS note to SAP, I explained issue to them. Please find their email below:
They are going to come up with the fix on 04/25/2011
Hi Murugappan,
Thanks for raising the issue.
As spoke on the phone, I'm fowarding your message to development. They
will keep the analysis on monday and contact you with their results.
Best regards,
Gabriel Marx Bellina
Support Engineer MS
SAP Active Global Support- HCM -
Pooling data from an XML file to another XML file using File Adapter
Hi,
I am trying to Pool data from an XML file to another XML file using File Adapter. I have added "Target Namespace" in both the XML and XSD.The problem is "At the destination given in the FileAdapter" only a blank XML file is created and it doesnot have any data.
Kindly suggest me some methods
Thanks in Advance.Ok here is a solution with external tables.
SQL> CREATE DIRECTORY my_xml_dir AS 'E:\oracle\Log_files\UTL_AKIVATST'
2 /
Directory created.
SQL> DROP TABLE my_xml_et
2 /
Table dropped.
SQL> CREATE TABLE my_xml_et
2 ( EMPNO NUMBER,
3 EMPNAME VARCHAR2(10),
4 JOB VARCHAR2(10),
5 HIREDATE DATE,
6 SAL NUMBER
7 )
8 ORGANIZATION EXTERNAL
9 (
10 TYPE ORACLE_LOADER
11 DEFAULT DIRECTORY my_xml_dir
12 ACCESS PARAMETERS
13 (
14 records delimited by "</EMP>"
15 badfile my_xml_dir:'empxt%a_%p.bad'
16 logfile my_xml_dir:'empxt%a_%p.log'
17 FIELDS
18 (
19 filler char(2000) terminated by "<EMP>",
20 EMPNO char(2000) enclosed by "<EMPNO>" and "</EMPNO>",
21 EMPNAME char(2000) enclosed by "<ENAME>" and "</ENAME>",
22 JOB char(2000) enclosed by "<JOB>" and "</JOB>",
23 HIREDATE char(2000) enclosed by "<HIREDATE>" and "</HIREDATE>",
24 SAL char(2000) enclosed by "<SAL>" and "</SAL>"
25 )
26 )
27 LOCATION ('emp.xml')
28 )
29 PARALLEL
30 REJECT LIMIT UNLIMITED
31 /
Table created.
SQL> SELECT * FROM my_xml_et
2 /
EMPNO EMPNAME JOB HIREDATE SAL
7369 SMITH CLERK 17-DEC-80 800
7499 ALLEN SALESMAN 20-FEB-81 1600
This is the XML file i used emp.xml
<EMPLOYEES>
<EMP>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<HIREDATE>17-DEC-80</HIREDATE>
<SAL>800</SAL>
</EMP>
<EMP>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<HIREDATE>20-FEB-81</HIREDATE>
<SAL>1600</SAL>
<COMM>300</COMM>
</EMP>
</EMPLOYEES>
Use this external table to insert into your table.
Thanks,
Karthick. -
I have a BIP Report that I'm generating from an XML file. The XML file also contains the email addresses to which these reports should be bursted to. When creating the data model from the XML file, I have the option of defining my bursting options but it seems that "SQL Query" is only allowed option.
Is it not possible to burst dynamically from an XML file?
Could you show me how I can get this done. The docs haven't really been too helpful.
ThanksOf course, this is possible. But what kind of "GUI XML" are you talking about? Is the XML given? Does it already conform to some GUI-XML-API? Give more infos!
-
Is it possible to extract the xpath for fields from a XML file
Hi,
After all we do the recording to capture the xpath of the fields, so i thought of extracting xpath from a XML file will be a good idea.
Is there a way to do this?
Please suggest
regards
SureshYes, there is. Go to the Tools menu -> Generate XPaths and load in your xml file. Select the element you are interested in and you will get the XPath to utilise.
Regards,
Jamie -
Need to insert values into a table from a XML file
Hi,
I'm an Oracle 9i/10g DBA with quite a few years experience, but I'm new to XML and dealing with it in database terms. I've been given a project that entails pulling XML values out of a file (or 100's of them) and storing them in the database so that they are searchable by end-users. The project is classified as secret so I'm unable to upload the specific XML or any info relating to the structire of the XML or the table I will use to insert the values into - sorry!! So, I've created an XML file with a similar structure to help people understand my predicament.
The end-users only need to search on a subset of the total amount of columns from the table I'll insert data into, although the XML file has a lot more, so I dont need to store the other values - but I will need to store the name of the XML file (or a pointer to it so I know what XML file a particular set of values belong to) in another column of the table along with its associated values.
I've been using the XMLTABLE function with some degree of success, although I had better succes using the XMLSEQUENCE function. However, I found out this is deprecated in 10g and replaced with XMLTABLE, so I guess it's better if I use this in case we ever need to upgrade to 11g.
The main problem I've been having is that some elements in the XML files have multiple values for the one record when all the other records are the same. In terms of storing this in the database, I guess it would mean inserting multiple rows in the table for each element where the value differs. Here is a dumbed down XML file similar to what I've got along with the other SQL I've used:
+<?xml version="1.0" encoding="UTF-8"?>+
+<House>+
+<Warehouse>+
+<WarehouseId>1</WarehouseId>+
+<WarehouseName>+
+<Town>Southlake</Town>+
+<State>Texas</State>+
+</WarehouseName>+
+<Building>Owned</Building>+
+<Area>25000</Area>+
+<Docks>2</Docks>+
+<DockType>Rear load</DockType>+
+<WaterAccess>true</WaterAccess>+
+<RailAccess>N</RailAccess>+
+<Parking>Street</Parking>+
+<VClearance>10</VClearance>+
+</Warehouse>+
+<Warehouse>+
+<WarehouseId>2</WarehouseId>+
+<WarehouseName>+
+<Town>Poole</Town>+
+<State>Dorset</State>+
+</WarehouseName>+
+<WarehouseName>+
+<Town>Solihull</Town>+
+<County>West Midlands</State>+
+</WarehouseName>+
+<Building>Owned</Building>+
+<Area>40000</Area>+
+<Docks>5</Docks>+
+<DockType>Rear load</DockType>+
+<WaterAccess>true</WaterAccess>+
+<RailAccess>N</RailAccess>+
+<Parking>Bay</Parking>+
+<VClearance>10</VClearance>+
+</Warehouse>+
+<Warehouse>+
+<WarehouseId>3</WarehouseId>+
+<WarehouseName>+
+<Town>Fleet</Town>+
+<County>Hampshire</County>+
+</WarehouseName>+
+<Building>Owned</Building>+
+<Area>10000</Area>+
+<Docks>1</Docks>+
+<DockType>Side load</DockType>+
+<WaterAccess>false</WaterAccess>+
+<RailAccess>N</RailAccess>+
+<Parking>Bay</Parking>+
+<VClearance>20</VClearance>+
+</Warehouse>+
+</House>+
CREATE TABLE xmltest OF XMLTYPE;
INSERT INTO xmltest
VALUES(xmltype(bfilename('XML_DIR', 'test.xml'), nls_charset_id('AL32UTF8')));
Consequently, I need to...
1) Retrieve the results from the XML file for all 3 warehouses where multiple values for the same sub-element are shown as 2 rowsthe result set. (I am guessing there will be 4 rows returned as warehouse sub-2 has 2 different elements for <WarehouseName>.
2) Build a case statement into the query so that regardless of the sub-element name (i.e State or County), it is returned into the 1 column, for instance County.
So, if I run a query similar to the following...
select y.WarehouseId, y.Town, y.County, y.Area
from xmltest x, xmltable('/House/Warehouse' .......
I would like to get results back like this...
ID Town County Area
1 Southlake Texas 25000
2 Poole Dorset 40000
2 Solihull West Midlands 40000
3 Fleet hampshire 10000
Sorry for the non-formatting but I hope this all makessense to someone out there with what I'm trying to do.
I appreciate any help whatsoever because, as i said before, I'm totally new to XML and trying to read the vast amount of information there is out there on XML is all a bit daunting.
Many thanks in advance,
Shaun.Hi again,
Thanks for keeping the post open for me. I've had a look at the post illustrating the XFileHandler package, and tried to alter it to make it fit with my XML files. To help explain things, my XML file looks like this:
<?xml version="1.0"?>
<!DOCTYPE CMF_Doc SYSTEM "CMF_Doc.dtd">
<House>
<Warehouse>
<WarehouseId>1</WarehouseId>
<WarehouseName>
<Town>Southlake</Town>
<State>Texas</State>
</WarehouseName>
<Building>Owned</Building>
<Area>25000</Area>
<Docks>2</Docks>
<DockType>Rear load</DockType>
<WaterAccess>true</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Street</Parking>
<VClearance>10</VClearance>
</Warehouse>
<Warehouse>House
<WarehouseId>2</WarehouseId>
<WarehouseName>
<Town>Poole</Town>
<State>Dorset</State>
</WarehouseName>
<WarehouseName>
<Town>Solihull</Town>
<County>West Midlands</County>
</WarehouseName>
<Building>Owned</Building>
<Area>40000</Area>
<Docks>5</Docks>
<DockType>Rear load</DockType>
<WaterAccess>true</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Bay</Parking>
<VClearance>10</VClearance>
</Warehouse>
<Warehouse>
<WarehouseId>3</WarehouseId>
<WarehouseName>
<Town>Fleet</Town>
<County>Hampshire</County>
</WarehouseName>
<Building>Owned</Building>
<Area>10000</Area>
<Docks>1</Docks>
<DockType>Side load</DockType>
<WaterAccess>false</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Bay</Parking>
<VClearance>20</VClearance>
</Warehouse>
</House>
<?xml version="1.0" encoding="UTF-8"?>
<House>
<Warehouse>
<WarehouseId>4</WarehouseId>
<WarehouseName>
<Town>Dallas</Town>
<State>Texas</State>
</WarehouseName>
<Building>Owned</Building>
<Area>25000</Area>
<Docks>2</Docks>
<DockType>Rear load</DockType>
<WaterAccess>true</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Street</Parking>
<VClearance>10</VClearance>
</Warehouse>
<Warehouse>
<WarehouseId>5</WarehouseId>
<WarehouseName>
<Town>Dorchester</Town>
<State>Dorset</State>
</WarehouseName>
<WarehouseName>
<Town>Solihull</Town>
<County>West Midlands</County>
</WarehouseName>
<Building>Owned</Building>
<Area>40000</Area>
<Docks>5</Docks>
<DockType>Rear load</DockType>
<WaterAccess>true</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Bay</Parking>
<VClearance>10</VClearance>
</Warehouse>
<Warehouse>
<WarehouseId>6</WarehouseId>
<WarehouseName>
<Town>Farnborough</Town>
<County>Hampshire</County>
</WarehouseName>
<Building>Owned</Building>
<Area>10000</Area>
<Docks>1</Docks>
<DockType>Side load</DockType>
<WaterAccess>false</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Bay</Parking>
<VClearance>20</VClearance>
</Warehouse>
</House>
<?xml version="1.0" encoding="UTF-8"?>
<House>
<Warehouse>
<WarehouseId>7</WarehouseId>
<WarehouseName>
<Town>Southlake</Town>
<State>Texas</State>
</WarehouseName>
<Building>Owned</Building>
<Area>25000</Area>
<Docks>2</Docks>
<DockType>Rear load</DockType>
<WaterAccess>true</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Street</Parking>
<VClearance>10</VClearance>
</Warehouse>
<Warehouse>
<WarehouseId>8</WarehouseId>
<WarehouseName>
<Town>Bournemouth</Town>
<State>Dorset</State>
</WarehouseName>
<WarehouseName>
<Town>Shirley</Town>
<County>West Midlands</County>
</WarehouseName>
<Building>Owned</Building>
<Area>30000</Area>
<Docks>5</Docks>
<DockType>Rear load</DockType>
<WaterAccess>true</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Bay</Parking>
<VClearance>10</VClearance>
</Warehouse>
<Warehouse>
<WarehouseId>9</WarehouseId>
<WarehouseName>
<Town>Clapham</Town>
<County>London</County>
</WarehouseName>
<Building>Owned</Building>
<Area>10000</Area>
<Docks>1</Docks>
<DockType>Side load</DockType>
<WaterAccess>false</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Bay</Parking>
<VClearance>20</VClearance>
</Warehouse>
</House>And the XFilehandler package looks like this (I'm just trying to do a simple select only on WarehouseId & WaterAccess for the time being to keep things simple):
create or replace package XFileHandler as
TYPE TRECORD IS RECORD (
WID NUMBER(2)
, WACCESS VARCHAR2(5)
type TRecordTable is table of TRecord;
function getRows (p_directory in varchar2, p_filename in varchar2) return TRecordTable pipelined;
end;
create or replace package body XFileHandler is
function getRows (p_directory in varchar2, p_filename in varchar2)
return TRecordTable pipelined
is
nb_rec number := 1;
tmp_xml clob;
tmp_file clob;
rec TRecord;
begin
DBMS_LOB.CREATETEMPORARY(TMP_FILE, TRUE);
tmp_file := dbms_xslprocessor.read2clob(p_directory, p_filename);
LOOP
tmp_xml := regexp_substr(tmp_file, '<\?xml[^?]+\?>\s*<([^>]+)>.*?</\1>', 1, nb_rec, 'n');
exit when length(tmp_xml) = 0;
--dbms_output.put_line(tmp_rec);
nb_rec := nb_rec + 1;
select y.WID, y.WACCESS
into rec.WID, rec.WACCESS
from xmltable('/House' passing xmltype(tmp_xml)
columns WID NUMBER(2) PATH 'Warehouse/WarehouseId',
WACCESS VARCHAR2(5) PATH 'WaterAccess') y;
pipe row ( rec );
end loop;
dbms_lob.freetemporary(tmp_file);
return;
end;
end;Now, when I run the query:
select * from table(XFileHandler.getRows('XML_DIR', 'XFileHandler_test.xml'));I get the error: ORA-00600: internal error code, arguments: [17285], [0x5CFE8DC8], [4], [0x45ABE1C8], [], [], [], []
I had a look in the dump file for anything obvious, but nothing really stands out. Is there anything obvious in my code that I'm missing or something else which you may think could be causing this error, e.g in the regular expression regexp_substr?
Many thanks,
Shaun. -
Crystal Report that reads from an XML file Datetime or Date
I have a Crystal Report 2008 that reads from an XML file, the source File XML Date data looks like this: 2008-03-10
But the Crystal Report interpreted by datatime, I need the Crystal Report to look like this: 2008/03/10 (date) not 2008-03-10T00:00:00-05:00 (datatime)
Look at an example (source file xml, report, and parameter file to execute report) at url: http://www.5websoft.com/sample.zip
Import the file in the design and will to verify that interpret incorrectly the fields of type date as datetime
not mapped currently for fields..
Help.....
Thanks!You could always reformat the field to only display the date portion:
Format Field > Date and Time tab; choose the date style you need here.
Or create a formula to extract just the date and use this field in your report:
date({table.field}) -
How can I read an XML string that's not from an XML file?
I've got a script I'm trying to setup that communicates over a socket to retrieve different directions from a custom built Java program. The Java program listens to requests from the Adobe scripting engine (in my case it's a Photoshop script) on a socket and immediately responds with the next set of directions. These directions are currently in XML format. The issue I'm having is that I can't parse the XML data since it's entered into a new XML object from a string rather than being read from a file. Even without the socket code, you can see the issue by doing the following:
var xml = new XML("<test><data>hey!</data></test>");
alert(xml.test.data);
alert(xml);
The first alert "should" return "hey!" (without quotes, of course), but it doesn't, while the second alert returns what you would expect it to:
<test>
<data>hey!</data>
</test>
It works fine if read from an XML file, but from a string, like shown above, it just presents an empty alert box when attempting to access "xml.test.data". Any ideas on how to fix this issue? Can it be fixed? Has it been fixed in newer versions (I'm currently using CS4)?
Thanks in advance for any help!Duh... found my error... I was attempting to access the data by referencing the created "root" element. Since <test> is the very first element tag, it's setup as the root element, which you don't need to reference. Changing the alert to alert(xml.data); fixed it.
Now I just feel dumb, lol... -
Using HTTPService to import data from a XML file
Hello there!
I'm having some problem's with this import... If anyone can
help, I would appreciate it!
I'm using this type of information as data source:
public var dataCollection:ArrayCollection =
new ArrayCollection([
{ id: "P1", name: "Porto", type: "team", children: [
{ id: "R1", name: "Dr Silva", location: "Bloco 1", type:
"member" },
{ id: "R2", name: "Dra Neto", location: "Gabinete", type:
"member"
{ id: "P2", name: "Braga", type: "team", children: [
{ id: "R3", name: "Dr Santos", location: "Bloco 2", type:
"member" },
{ id: "R4", name: "Dra Sonia", location: "Piso 1", type:
"member"
But I want to import it from a XML file like this:
<?xml version="1.0" encoding="utf-8"?>
<items>
<item id="P1" name="Porto" type="team">
<children id="R1" name="Dr Silva" location="Bloco 1"
type="member" />
<children id="R2" name="Dra Neto" location="Gabinete"
type="member" />
</item>
<item id="P2" name="Braga" type="team">
<children id="R3" name="Dr Santos" location="Bloco 2"
type="member" />
<children id="R4" name="Dra Sonia" location="Piso 1"
type="member" />
</item>
</items>
I already import the file, but can not translate the data
into a array collection.
private function initApp():void {
var httpService:HTTPService = new HTTPService();
httpService.url = "dataprovider.xml";
httpService.resultFormat = "e4x";
httpService.addEventListener(FaultEvent.FAULT,
onFaultHttpService);
httpService.addEventListener(ResultEvent.RESULT,
onResultHttpService);
httpService.send();
private function onFaultHttpService(e:FaultEvent):void
Alert.show("Error reading data file.");
private function onResultHttpService(e:ResultEvent):void
//Convert the xml data to a array collection
Thank youHello Peter, and thank you for your reply's.
My problem is that I'm receiving the data from the external
file and I don't know how to get the children in place... I mean, I
also have some data being received form a file that I can convert
into an array collection, but the thing is, that file doesn't have
children structure...
It's something like this:
<?xml version="1.0" encoding="utf-8"?>
<items>
<item id="T1" resourceId="R1" name="Cardiologia"
startTime="25-3-09 8:0:0" endTime="25-3-09 8:30:0" />
<item id="T2" resourceId="R2" name="Raio-X"
startTime="25-3-09 9:0:0" endTime="25-3-09 9:15:0" />
<item id="T3" resourceId="R3" name="Analises"
startTime="25-3-09 12:0:0" endTime="25-3-09 12:45:0" />
<item id="T4" resourceId="R4" name="Consulta"
startTime="26-3-09 8:0:0" endTime="26-3-09 9:0:0" />
</items>
And I solve it with this (don't know if is the best):
private function onResultHttpServiceTask(e:ResultEvent):void
var a:Array = xmlListToObjectArray(e.result.item);
tasks = new ArrayCollection(a);
protected function
xmlListToObjectArray(xmlList:XMLList):Array
var a:Array = new Array();
for each(var xml:XML in xmlList)
var attributes:XMLList = xml.attributes();
var o:Object = new Object();
for each (var attribute:XML in attributes)
var nodeName:String = attribute.name().toString();
var value:*;
value = attribute.toString();
o[nodeName] = value;
a.push(new ObjectProxy(o));
return a;
But when the children "enter in action" I don't know how to
bring them to the array...
This code you send it's preaty much the thing I need, but the
thing is that I don't know how to call the children with data as
e:ResultEvent...
If you can help a bit more, I would really appreciate...
Thank You -
Error in Reading data from a xml file in ESB
Hi,
i created a inbound file adapter service which reads data from a xml file and passes it to the routing service and from there updates to the database.....
(everything created in jdeveloper)
But i am getting error....it is not getting updated to the database...when i check the database(select * from table) its showing one row selected but i couldnt find the data....
Transformation mapping also i did...
i think may be some error in reading the data from the xml file but not so sure.....
please reply to this mail as soon as possible its very urgentMichael R wrote:
The target table will be created when you execute the interface, if you set the option on the flow tab as instructed in step #6 of the "Setting up ODI Constraint on CLIENT Datastore" Section.
Option Value
CREATE_TARG_TABLE trueHi Michel,
This was not my required answer.I am sorry that I was unable to clarify my question.Actually
+This project executed successfully with some warning.Target Table is automatically created in database and also populated with data.But when I right-click Target Datastore(in >Mapping Tab of the Interface), and then select Data to View Data that needs to be inserted in the target table.I get some error like this:-...+This above line is the result of my project my problem is
when I right-click Target Datastore(in Mapping Tab of the Interface), and then select Data to View Data that already inserted in the target table.Is not shown by the view data operation.
I meant to say I am facing this error
At the10(1010 written) step of
Creating a New ODI Interface to Perform XML File to RDBMS Table Transformation
wehre it says
Open the Interface tab. Select Mapping tab, right-click Target Datastore - CLIENT, and then select Data. View Data inserted in the target table. Close Data Editor. Close the tabs...
In my case when I use my sqldeveloper I can see data successfully inserted in my target table and also in error table (data that can't satisfy the constraint) .But I was unable to check this by following the above mentioned 10 th step and got this error.
Thanks -
Error loading data from an XML file using HTTPService
Hello All,
I have a runtime error that has got me beat at the moment I am building an App in Flash Builder 4 to run on AIR.
The error is as follows: TypeError: Error #1009: Cannot access a property or method of a null object reference.
What i'm Trying to Do:
I have 2 DropDownList controls, the first is populated with country names and the other with language options. All the 1st DropDownList control does
is set an image control to display the country flag and enable the 2nd DropDownList.
The 2nd DropDownList sets the langCode variable equal to the chosen language code. I then call the language function and pass it langCode. Using this variable, I build up the string
so that langFilePath will be equal to the XML file (which is "Lang_GBR.xml") location on my desktop and then call the HTTPService.
As soon as the language function is called, the runtime error occurs and highlights the line with btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
where I try to assign the button label with a new value from the XML file.
I suspect this may be a trivial error but I just can't see it at the moment.
Any help or guidance would be appreciated. Thanks
Code:
<fx:Script>
<![CDATA[
[Bindable]
public var langFilePath:String;
public var langDir:File = File.desktopDirectory;
public var langCode:String;
public function countrySelect_changeHandler(event:IndexChangeEvent):void
switch (countrySelect.selectedItem)
case ('United Kingdom'):
trace("Item Selected was: "+ countrySelect.selectedItem);
img_countryFlag.source = AngolaFlag;
break;
case ('France'):
trace("Item Selected was: "+ countrySelect.selectedItem);
img_countryFlag.source = AustraliaFlag;
break;
default:
break;
langSelect.enabled = true;
trace("1st dropdownbox");
public function langSelect_changeHandler(event:IndexChangeEvent):void
switch (langSelect.selectedItem)
case ('English'):
trace("Language Selected was: "+ langSelect.selectedItem);
langCode = "Lang_GBR";
break;
case ('French'):
trace("Language Selected was: "+ langSelect.selectedItem);
langCode = "Lang_FRA";
break;
language(langCode);
public function language(aParam:String):void
trace("Code Was: " + aParam);
trace("Lang dir: " + langDir.nativePath);
langFilePath = langDir.nativePath + "/" + aParam + ".xml";
trace("File to load: " + langFilePath);
trace("loadLangFile.url: " + loadLangService.url);
loadLangService.send();
btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
]]>
</fx:Script>
<fx:Declarations>
<s:HTTPService id="loadLangService" url="{langFilePath}"/>
</fx:Declarations>
<s:DropDownList x="10" y="201" id="countrySelect" prompt="Please Select Your Country" width="274" enabled="true" change="countrySelect_changeHandler(event)">
<s:DropDownList x="10" y="348" id="langSelect" prompt="Please Select Your Language" width="274" enabled="false" change="langSelect_changeHandler(event)">Don't sure about your XML structure, but for now i see the problem here between this 2 lines of code:
loadLangService.send();
btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
Think data that your httpService should receive just can't go so fast to populate the lastResult before you call it in the next line
Try adding a result listener to your service before you send it:
loadLangService.addEventListener(ResultEvent.RESULT, handler);
loadLangService.send();
function handler(event:ResultEvent):void {
btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu; -
Loading an xml file from an xml file
I'm trying to load an xml file from an xml file, but I'm
having problems. My first xml file is really simple - it only
contains one attribute with the name of another xml file in it
(eventually I will have multiple xml files in here and run a loop
on them...this is why I want to load an xml file from an xml file).
Currently, with the code below, I can get the main xml file
to load ("main.xml"), but I cannot get the secondary xml files to
load FROM the main.xml.
I want to then take childNode values from the secondary xml
file and use them within my .swf in text boxes and whatnot.
Any guidance? I think I'm going wrong on the line where I'm
saying "i.newxml.load(i.attributes.location);"
- How can I get this to work?johnypeter:
I tried changing the code inside the loop to use just
"newxml" instead of "i.newxml", and I declared with "var newxml =
new XML();" - was this what you were thinking?
kglad:
The reason I tried to use the loadXML() function in the loop
was so that for each node in my "main.xml" it would load the new
xml file listed - this is a no-no? Do you have any ideas as to what
I could do?
For the for-loop, what should I change in it? I'm not great
with loops so I tried to modify some code from another loop I found
in another forum thread - not the right way to do it here?
Also, what should I trace? The value of the _root.address, or
i.attributes.location? I have created dynamic text boxes on my
stage to see if the correct value from the xml file loads (ie. the
name of the xml file within the xml file) and it does, but now I
don't know how to put that information into ANOTHER loadXML()
function and get the node information from it - does that make
sense???
Below are the examples of the xml files I am using. In the
first one, main.xml, I will have a list of multiple xml files, each
with the same nodes and elements as in the details.xml file
(different values, of course).
This is just to give you an example of what I'm trying to
accomplish - pulling ALL the addresses and phone numbers from
multiple xml files. I cannot manually collect this information, as
it is dynamic, and will be updated in each individual details.xml.
I was hoping to collect the information by simply adding to and
updating ONE xml file - main.xml.
Do you think this can be done? Am I going about it the wrong
way? I'm quite limited in AS knowledge, which is why I'm piecing
together code from other posts!
Maybe you are looking for
-
Solution to "Error 8" and "Cancelled Invitation" Problems with video chats
We spent nearly five hours trying to video chat two Macs, one a 15" MacBook Pro using 10.5.6 across an Airport Extreme and cable modem. The other a 15" DualCore using 10.4.11 across an Airport Extreme and DSL. One runs iChat 4.0.7, the other iChat 3.
-
Most websites I try to save will NOT save as a bookmark...not sure why? Some sites will work while others will not
-
Backing up to Vista via Macdisk
An Apple support person told me I need a Mac formatted drive to use Time Machine. I want to backup my Macbook to a Vista 64bit machine, which is on my wireless network. Can I use http://www.mediafour.com/products/macdrive/ and Time Machine will then
-
What version of Garageband is on my install disc?
I was recently given a Powerbook PowerPC G4 with OS X Tiger 10.4.11. I have the original install discs and I want to re-load OS X and all the applications. Does anyone know what version of Garageband comes as a part of iLife on the install disc? I cu
-
(Sun ONE Messaging Server 6.2-8.04)Email sending problem
situation: user ([email protected]) sent email to [email protected], [email protected], [email protected] and [email protected] then encounter errors message as below, anybody can please help me about what's wrong with the email address or error mess