Create button to load XML!
Hello! Please help! I created 3 languages into strings panel,
and i created 3 buttons for this languages! But this buttons not
work (:! Which script in this butttons?
my script:
on(release) {
loadVariables("ua/ArtMaster_ua.xml", "_root");
}
loading an xml file as varuables wont work. You need either
to feed a files with just variables ( like
var1=ladida&var2=didala etc );
or you use an xml object to load the xml:
myXML =new XML();
myXML.load("xmlfile.xml")
then you need to need to process the xml to add meaning to
the tags.. or just put them in an array...
Similar Messages
-
Hi Everybody,
as my first experience in AS3 I'm bulding a photo multigallery. In that gallery I have some buttons, each one pointing to its respective set of images.
Each button is created with the for loop, that picks the information from a XML file. From this XML I get the text of the button, the position etc. What I did with some sucess. But there is a scary problem: I don't know how to make each button load the respective and unique set of images.
I've tryied several different methods, with no effect, to make each loop to give to each button an unique identity to load the respective set of images.
I imagine that the solution pass by the use of arrays. I wrote some code, and I guess that I'm almost there (but not sure). Here is my AS3 code until now:
// CREATE MENU CONTAINER //
var menuContainer:MovieClip = new MovieClip();
menuContainer.x=10;
menuContainer.y=300;
addChild(menuContainer);
// CREATE IMAGES CONTAINER //
var imagesContainer:MovieClip = new MovieClip();
imagesContainer.x=10;
imagesContainer.y=10;
addChild(imagesContainer);
//// LOAD XML ////
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
var xml:XML;
function whenLoaded(evt:Event):void {
xml=new XML(evt.target.data);
var mySetsList:XMLList=xml.children();
//// MENU BUTTONS ////
// CREATE ARRAYS //
var totalArray:Array = new Array();
var setNodesArray:Array = new Array();
var setNamesArray:Array = new Array();
// POSITIONING BUTTONS INSIDE MENU CONTAINER//
var rowsQuantity:Number=3;
var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
var cellWidth:Number=160;
// CREATE BUTTONS //
for (var i:int=0; i< mySetsList.length(); i++) {
var newSetButtonMC:setButtonMC=new setButtonMC();
//what do I do here to make it works? To give each button created a unique id.
setNodesArray.push(i);
//trace(setNodesArray);
var imageNodesArray:Array = new Array();
for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("imageTitle"));
totalArray.push(imageNodesArray);
newSetButtonMC.setButtonText.text=mySetsList.attribute("galeriaTitle")[i];
newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
var cellX:Number=Math.floor(i/rowsQuantity);
var cellY:Number=i%rowsQuantity;
newSetButtonMC.x=cellX*cellWidth;
newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
newSetButtonMC.addEventListener(MouseEvent.CLICK, onClick);
menuContainer.addChild(newSetButtonMC);
totalArray.push(setNodesArray);
//// MENU BUTTONS ACTIONS ////
function onClick(mevt:MouseEvent):void {
trace(totalArray [0][0]);
trace(totalArray [0][0]);
// in the line above I achieved some success loading a specific info from XML.
// but I don't know what to do with it.
//what do I do here? To make each button to load its own node from XML.
Here is my XML:
<GALERIA galeriaTitle="galeria 01">
<IMAGE imageTitle="imageTitle01">feio.jpg</IMAGE>
<IMAGE imageTitle="imageTitle02">muitofeio.jpg</IMAGE>
<IMAGE imageTitle="imageTitle03">aindamaisfeio.jpg</IMAGE>
</GALERIA>
<GALERIA galeriaTitle="galeria 02">
<IMAGE imageTitle="imageTitle01">estranho.jpg</IMAGE>
<IMAGE imageTitle="imageTitle02">maisestranho.jpg</IMAGE>
<IMAGE imageTitle="imageTitle03">aindamaisestranho.jpg</IMAGE>
</GALERIA>
Thanks everyone . ABSTRATOyou can assign each newSetButtonMC and ivar property that points to its i value or, even easier:
// CREATE MENU CONTAINER //
var menuContainer:MovieClip = new MovieClip();
menuContainer.x=10;
menuContainer.y=300;
addChild(menuContainer);
// CREATE IMAGES CONTAINER //
var imagesContainer:MovieClip = new MovieClip();
imagesContainer.x=10;
imagesContainer.y=10;
addChild(imagesContainer);
//// LOAD XML ////
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
var xml:XML;
function whenLoaded(evt:Event):void {
xml=new XML(evt.target.data);
var mySetsList:XMLList=xml.children();
//// MENU BUTTONS ////
// CREATE ARRAYS //
var totalArray:Array = new Array();
var setNodesArray:Array = new Array();
var setNamesArray:Array = new Array();
// POSITIONING BUTTONS INSIDE MENU CONTAINER//
var rowsQuantity:Number=3;
var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
var cellWidth:Number=160;
// CREATE BUTTONS //
for (var i:int=0; i< mySetsList.length(); i++) {
var newSetButtonMC:setButtonMC=new setButtonMC();
//what do I do here to make it works? To give each button created a unique id.
setNodesArray.push(i);
//trace(setNodesArray);
var imageNodesArray:Array = new Array();
for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("imageTitle"));
nextSetButtonMC.imageArray = imageNodesArray;
//totalArray.push(imageNodesArray);
newSetButtonMC.setButtonText.text=mySetsList.attribute("galeriaTitle")[i];
newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
var cellX:Number=Math.floor(i/rowsQuantity);
var cellY:Number=i%rowsQuantity;
newSetButtonMC.x=cellX*cellWidth;
newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
newSetButtonMC.addEventListener(MouseEvent.CLICK, onClick);
menuContainer.addChild(newSetButtonMC);
totalArray.push(setNodesArray);
//// MENU BUTTONS ACTIONS ////
function onClick(mevt:MouseEvent):void {
var mc:setButtonMC=setButtonMC(mevt.currentTarget);
for(i=0;i<mc.imageArray.length;i++){
trace(mc.imageArray[i]);
Here is my XML:
<GALERIA galeriaTitle="galeria 01">
<IMAGE imageTitle="imageTitle01">feio.jpg</IMAGE>
<IMAGE imageTitle="imageTitle02">muitofeio.jpg</IMAGE>
<IMAGE imageTitle="imageTitle03">aindamaisfeio.jpg</IMAGE>
</GALERIA>
<GALERIA galeriaTitle="galeria 02">
<IMAGE imageTitle="imageTitle01">estranho.jpg</IMAGE>
<IMAGE imageTitle="imageTitle02">maisestranho.jpg</IMAGE>
<IMAGE imageTitle="imageTitle03">aindamaisestranho.jpg</IMAGE>
</GALERIA>
Thanks everyone . ABSTRATO -
Creating new analysis gives "Error loading XML Document from ..."
Trying to create analysis and getting "Error loading XML Document from saw.dll/answers/answersproperties.xml?fmapId=S1clug.
The response given was:" after choosing subject area. Analysis editor is opened but Subject Areas is empty and can't do anything.
The problem is on Mozilla 12 (16.0.2, 17.0.1) and IE 8. Chrome works fine.
My system is Win 7, BI 11.1.1.6.0 is on Oracle Linux (and by the way Mozilla from Linux system works fine)
What could be the reason of this?
Edited by: 898973 on 4/12/2012 15:11Reinstalling Mozilla with "Remove personal data" option checked resolved the problem.
-
How2 load xml into datagrid, and create realtime search of datagrid data
I wanted to be able to load xml data into a datagrid and then create a searchbox that would search in real time (as person typed) from any part of the datagrid. Does anyone know of any as2.0 component that can do that easily? If not, i would like to try to tackle this the old fashioned and use this to teach myself as2.0 advanced coding. can someone point to a step by step or explain how i might get this accomplished? from loading the xml to putting the node info into the datagrid, to being able to search it in real time. This is part of a project that i was given that has some serious consequences if i botch it. Please help! Thanks so much!
import fl.controls.DataGrid;
import fl.controls.ScrollPolicy;
import fl.data.DataProvider;
import flash.net.URLLoader;
import flash.events.Event;
var dp:DataProvider = new DataProvider();
var dg:DataGrid = new DataGrid();
dg.columns=["User","Xp","Rank"];
addChild(dg);
var urlloader:URLLoader = new URLLoader();
urlloader.addEventListener(Event.COMPLETE,loadcompleteF);
urlloader.load(new URLRequest("whatever.xml"));
function loadcompleteF(e:Event):void {
var xml:XML=XML(e.target.data);
for (var i:int = 0; i < xml..Name.length(); i++) {
dp.addItem({User:xml..Name[i].User.text(), Xp:xml..Name[i].Xp.text(), Rank:xml..Name[i].Rank.text()});
dg.dataProvider=dp; -
Xml publisher enterprise!!! create rtf file dynamically with load xml data
i am new to xml publisher enterprise , i want a solution for this question ...
i want create rtf file dynamically with loading xml data....means i wrote a program in jsp where the the output in xml file simultaneously create rtf file..but i enable load the xml data in rtf file but when i goto rtf file from where data in that load xml then it genrate the columns..but i want in dynamiclly to load the data will you please guide me ......Hi Atiq
Im not quite clear on the requirement here:
1. Do you just want to be able to extract the data and apply a template to the XML data from your jdp and render output?
If so then you can use the XMLP APIs ... the are in the user guide. Particularly:
RTFProcessor - converts RTF template to XSLFO stylesheet
FOProcessor - takes, XML data, XSLFO stylesheet and output format and generates the required output.
2. Do you want a template that will accept any data and just format it into rows and columns ? This can be written but your XML structure is going to have to be static, the data of course can be dynamic.
Regards, Tim -
Issue in loading XML data in BW delta queue
Hello All,
My requirement is to stage small amount of XML data in SAP BW. For doing so, i have followed below steps...
1. Create File data source
2. Define Myself data source using file data source with Function module
3. Initialize load process without no data transfer
4. Using SOAP RFC service, Load xml records in delta queue.
Now in step number 4, i am unable to open the SOAP RFC service using which we can select the xml file.
Any help in this regard will be highly appriciated.
Thanks
KetanSOAP/RFC service is already activated. Only problem i am facing is as below.......
1. Created HTML page by copying html snipest
2. On created HTML page, select XML file as an input and URL of SOAP service which is pointing out to the application server
3. When i press "Send recordset" button, HTML page throws "Java script" error and data is not being pushed to BW delta queue....
Please share your ideas to resolve this issue.
Thanks in advance,
Ketan -
Error in loading XML data in BW delta queue
Hi All
My requirement is to stage small amount of XML data in SAP BW 3.5. For doing so, i have followed the steps specified in How to send XML data to BW
Link for "How to send XML data to BW"
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/21d8aa90-0201-0010-5e83-a3798b9a5ee0
1. Created File data source
2. Defined data source using file data source with Function module
3. Initialize load process without no data transfer
4. Using SOAP RFC service, Load xml records in delta queue.
Now in step number 4, i have created the following
1. Created the html code
2. On created HTML page, select .CSV file as an input and URL of SOAP service which is pointing out to the application server
3. When i press "XML Send recordset" button, HTML page throws "Java script" error and data is not being pushed to BW delta queue
Any help in this regard will be highly appreciated.
Thanks
YeshwantHi All
My requirement is to stage small amount of XML data in SAP BW 3.5. For doing so, i have followed the steps specified in How to send XML data to BW
Link for "How to send XML data to BW"
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/21d8aa90-0201-0010-5e83-a3798b9a5ee0
1. Created File data source
2. Defined data source using file data source with Function module
3. Initialize load process without no data transfer
4. Using SOAP RFC service, Load xml records in delta queue.
Now in step number 4, i have created the following
1. Created the html code
2. On created HTML page, select .CSV file as an input and URL of SOAP service which is pointing out to the application server
3. When i press "XML Send recordset" button, HTML page throws "Java script" error and data is not being pushed to BW delta queue
Any help in this regard will be highly appreciated.
Thanks
Yeshwant -
How would I create buttons states for MCs I am creating abstract MCs
I am creating a generic website that would have abstract MCs that would load jpg or TXT fields for the user interface to allow for fast updates to the site. The MCs that would make up the user interface would be empty and load things into it using XML or PHP later on. How would I create button states for the user interface MCs. I started creating a function for every MC button state but I thought there might be a more efficient way.
would creating a array help in this case?
and is using URLRequest the way to link to pages with in a movie well the flash movie that is the site it's self?
/*---------------------------- THE START OF MY ACTION SCRIPT ------------------------------*/
var waywardLogo_mc:MovieClip = new MovieClip;
var theCollection_mc:MovieClip = new MovieClip;
var newsPage_mc:MovieClip = new MovieClip;
var whatthe#$@!doyouwant!?_mc:MovieClip = new MovieClip;
/*---------------------------- onOver ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
theCollection_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
newspage_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
/*---------------------------- onOut ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
theCollection_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
newspage_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
/*---------------------------- onClick ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.CLICK,onClick);
theCollection_mc.addEventListener(MouseEvent.CLICK,onClick);
newspage_mc.addEventListener(MouseEvent.CLICK,onClick);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.CLICK,onClick);
function onOver(event:MouseEvent):void
event.target.alpha = .5;
function onOut(event:MouseEvent):void
event.target.alpha = 1;
function onClick(event:MouseEvent):void
event.target.URLRequest("");
/*---------------------------- onover, onOut, onClick buttonModes ------------------------------*/
waywardLogo_mc.buttonMode = true;
theCollection_mc.buttonMode = true;
newspage_mc.buttonMode = true;
whatthe#$@!doyouwant!?_mc.buttonMode = true;click insert/new symbol, tick movieclip, assign a name, tick export for actionscript and in the class textfield enter a name (say ButtonClass) and click ok.
attached to the first frame of your new movieclip, type stop() in the actions panel. put whatever graphic you want on-stage for your button's up stage. create another keyframe, label it "over" and put whatever graphic you want for button's over state on-stage.
in a layer above those graphics, you'll probably want to add a dynamic textfield so each of your buttons can have different text. assign the textfield and instance name (say tf) and extend its timeline to the last frame of your movieclip button.
then when you want to create a button, on your timeline you can use:
var b:ButtonClass=new ButtonClass(); // these two lines need to be entered for each button
buttonhandlerF(b,someX,someY);
//-------code between dotted lines only needs to be entered once no matter how many buttons you add --------------------
function buttonhandlerF(b:ButtonClass,x:Number,y:Number){
b.addEventListener(MouseEvent.MOUSE_OVER,overF);
b.addEventListener(MouseEVent.MOUSE_OUT,outF);
b.x=x
b.y=y
addChild(b);
function overF(e:MouseEvent){
e.currentTarget.gotoAndStop("over");
function outF(e:MouseEvent){
e.currentTarget.gotoAndStop(1);
//-------code between dotted lines only needs to be entered once --------------------
// you'll also want to create a click listener and listener function
the code between the dotted lines is amenable to being added to a ButtonClass.as class file if want to expand your capabilities. -
Need help with loading XML file
Hello,
I have been browsing the web/forums for an example on how to do this for a few days now. I managed to get this working in Flash Pro quite easily but I think I am missing something when I want to do the same thing in Flex.
Basically I want to load an XML file and then set the text values of 5 labels equal to the data in the XML file.
So I a button created in MXML and have set the click event as follows:
click="dsSetup(event)"
I have also declared the following:
public var myRequest:URLRequest = new URLRequest("assets/myFile.xml"); //folder located under src in project
public var myLoader:URLLoader = new URLLoader();
public var myXML:XML;
My function that loads is as follows:
public function dsSetup(event:MouseEvent):void
trace ("dsSetup");
myXML = new XML (myLoader.data);
h3.text = myXML.source.itemA;
h4.text = myXML.source.itemB;
h5.text = myXML.source.itemC;
h7.text = myXML.source.itemD;
h8.text = myXML.source.itemE;
currentState = 'MainMenu';
myLoader.addEventListener(Event.COMPLETE, dsSetup); // I think this line is now redundant as I have set it in the MXML
myLoader.load(myRequest);
This is the way I did it in Flash and it worked ok but I must be missing something in when it comes to Flex.
Can someone explain or point me to a good tutorial that shows how to load XML in Flex?
The ones I found seem to have about 50 lines of code just to load a file and add in way to much complexity for a beginner.
Many ThanksI would suggest to save the loaded data in a Bindable variable and then to bind the text-properties to that:
[Bindable]
var myXML:XML;
public function dsSetup(event:MouseEvent):void
myXML = new XML (myLoader.data);
currentState = 'MainMenu';
<s:Label text="{myXML.source.itemA}"/> -
How to load XML File to BW Delta Queue via Webpage
Hello altogether,
I am trying to load an CSV file via Webpage (the Webpage have to change the csv file in a xml/soap file) into BW Delta Queue.
Steps that I have made:
- Create an InfoSource
- Create an BW Data Source with Soap Connection
- Create an initial Delta without Data Transfer
- Create a Web Service with TC - SE37 - Utilities -> More Utilities -> Create Web Service
If I test the Web Service with TC - Soamanager (BW 7.0), the data entered here, are transferred to the BW Delta Queue.
If I test the function module ( TC - SE37), the data also transferred to the Delta Queue.
Now I think, that I have an error in the html file or the html file is not conform to the wsdl document?? Or should I have to create a virtual interface, but I don't find a possibility to creat it...???
Can you please help me????
The coding of the WSDL Document and the Website is attached (I can also send you the coding and error message via mail, if you want). Sorry I don't know how to display here the coding. I try it with symbol "click to display the text code", but afterwards I get an error message from the website... So let me please know your mail address and I send it via mail....
I hope, that somebody can help me!!!!!
Edited by: Alina99 on Sep 8, 2009 11:44 AM
Error Message from BW:
...sap-env:envelope..... soap-env:body><soap-env:fault><faultcode>soap-env:Client</faultcode></faultstring xml:lang="eng">Virtual Interface Method>_-BI0_-QI6AZ_XML_APPL2_RFC::urn:sap-com:document:sap:soap:functions:mc-style<not supported</faultstring>.......
Edited by: Alina99 on Sep 8, 2009 11:56 AMHello,
I have done all the necessary config in BW. However, as I mentioned earlier, we are still not up with XI so I am trying to load XML to BW delta queue. The question still remains, how do I make make the XML file (on my desktop say) point to the BW so the InfoPackage picks up and places in the delta queue? Even if I had XI, there has to be a way whereby BW looks for the XML file. That is what I want to know and stuck at.
Any detailed step by step help will be appreciated as always.
Cheers -
Problem to load XML SQL Utility into other user
Hi,
I need help to load XML Utility into other user than
"scott"tiger".
I loaded both xmlparser.jar and oraclexmlsql.jar into
"scott/tiger", it works and creating functions and testing work
fine. But when change USER_PASSWORD to another user, it gave me
some errors like
creating : org/xml/sax/helpers/AttributeListImpl
Error while creating class org/xml/sax/helpers/AttributeListImpl
ORA-29506: invalid query derived from USING clause
ORA-00942: table or view does not exist
Error while accessing MD5 table
ORA-00942: table or view does not exist
Do I need create any table or view for my another oracle account?
Or did I missed any thing. From the installation instruction, I
cano not find any about creating table or view before I load the
two jar files.
Thanks
Yuping
nullHi Yuping,
Great to hear that! Thx for posting the solution to the
problem! Let us know if you have any problems with the utility
or if u need any enhancements!
Thx
Murali
Yuping Zhu (guest) wrote:
: Hi,Murali,
: The problem is fixed now. When load xmlparser into the user, it
: creates two tables automatically, my mistake is I did not grant
: "create table" privilege to the user. After I granted the
: privilege to it, it works fine.
: Thanks!
: Yuping
: Murali K (guest) wrote:
: : Hi,
: : I will check this out with the Java folks and let u know
: : Thx
: : Murali K
: : Yuping Zhu (guest) wrote:
: : : Hi, Murali
: : : I'm using Oracle8i on Solaris 2.6. When I load xmlparser
: using
: : : loadjava -resolve -verbose -user $USER_PASSWORD
xmlparser.jar
: : : I get error message and I catch part of erros
: : : PS, I can load it into scott/tiger.
: : : Thanks!
: : : Yuping
: : : loading : org/w3c/dom/html/HTMLLegendElement
: : : Error while loading org/w3c/dom/html/HTMLLegendElement
: : : ORA-04068: existing state of packages has been
discarded
: : : ORA-04063: package body "IOEXML.LOADLOBS" has errors
: : : ORA-06508: PL/SQL: could not find program unit being called
: : : ORA-06512: at line 1
: : : creating : org/w3c/dom/html/HTMLLegendElement
: : : Error while creating class
org/w3c/dom/html/HTMLLegendElement
: : : ORA-29506: invalid query derived from USING clause
: : : ORA-00942: table or view does not exist
: : : Error while accessing MD5 table
: : : ORA-00942: table or view does not exist
: : : loading : org/w3c/dom/html/HTMLImageElement
: : : Error while loading org/w3c/dom/html/HTMLImageElement
: : : ORA-04068: existing state of packages has been
discarded
: : : ORA-04063: package body "IOEXML.LOADLOBS" has errors
: : : ORA-06508: PL/SQL: could not find program unit being called
: : : ORA-06512: at line 1
: : : creating : org/w3c/dom/html/HTMLImageElement
: : : Error while creating class
org/w3c/dom/html/HTMLImageElement
: : : ORA-29506: invalid query derived from USING clause
: : : ORA-00942: table or view does not exist
: : : Error while accessing MD5 table
: : : ORA-00942: table or view does not exist
: : : loading : oracle/xml/parser/v2/XSLException
: : : Error while loading oracle/xml/parser/v2/XSLException
: : : ORA-04068: existing state of packages has been
discarded
: : : ORA-04063: package body "IOEXML.LOADLOBS" has errors
: : : ORA-06508: PL/SQL: could not find program unit being called
: : : ORA-06512: at line 1
: : : Murali K (guest) wrote:
: : : : Hi Yuping,
: : : : I tried the same on a 8i database and it seems to be
: : working
: : : : fine. (loading into two schemas). In fact I just created
: the
: : : : other user and it doesnt have any tables or anything in
it.
: : : : You do not need to create anything (table/view) extra
for
: : : these
: : : : to work.
: : : : Which database (Oracle8 or 8i) are u using?
: : : : Thanks
: : : : Murali
: : : : Yuping Zhu (guest) wrote:
: : : : : Hi,
: : : : : I need help to load XML Utility into other user than
: : : : : "scott"tiger".
: : : : : I loaded both xmlparser.jar and oraclexmlsql.jar into
: : : : : "scott/tiger", it works and creating functions and
: testing
: : : work
: : : : : fine. But when change USER_PASSWORD to another user,
it
: : gave
: : : me
: : : : : some errors like
: : : : : creating : org/xml/sax/helpers/AttributeListImpl
: : : : : Error while creating class
: : : : org/xml/sax/helpers/AttributeListImpl
: : : : : ORA-29506: invalid query derived from USING clause
: : : : : ORA-00942: table or view does not exist
: : : : : Error while accessing MD5 table
: : : : : ORA-00942: table or view does not exist
: : : : : Do I need create any table or view for my another
oracle
: : : : account?
: : : : : Or did I missed any thing. From the installation
: : instruction,
: : : I
: : : : : cano not find any about creating table or view before
I
: : load
: : : : the
: : : : : two jar files.
: : : : : Thanks
: : : : : Yuping
null -
Error While Loading XMl Doc into Oracle Database 10g
Hi all,
I have a task that , I have to make a utillity by which we can load XML Doc into a Table. While searching on Internet i found following Procedure on ASK Tom
CREATE OR REPLACE
procedure insert_xml_emps(
p_directory in varchar2, p_filename in varchar2, vtableName in varchar2 )
as
v_filelocator bfile;
v_cloblocator clob;
l_ctx dbms_xmlsave.ctxType;
l_rows number;
begin
dbms_lob.createtemporary(v_cloblocator,true);
v_filelocator := bfilename(p_directory, p_filename);
dbms_lob.open(v_filelocator, dbms_lob.file_readonly);
DBMS_LOB.LOADFROMFILE(v_cloblocator, v_filelocator,
dbms_lob.getlength(v_filelocator));
l_ctx := dbms_xmlsave.newContext(vTableName);
l_rows := dbms_xmlsave.insertxml(l_ctx,v_cloblocator);
dbms_xmlsave.closeContext(l_ctx);
dbms_output.put_line(l_rows || ' rows inserted...');
dbms_lob.close(v_filelocator);
DBMS_LOB.FREETEMPORARY(v_cloblocator);
end ;
when i try to run this procedure
BEGIN
insert_xml_emps('XML_LOAD','load.xml','IBSCOLYTD');
END;
it gaves me following Error
ORA-29532: java call terminated by uncaught java exception : Oracle.xml.sql.OracleXMLSQLException:No
rows to modify-- the row enclosing tag missing. Specify the correct row enclosing tag.
ORA-06512: at "SYS.DBMS_XMLSAVE", line 115
ORA-06512: at "EXT_TEST.INSERT_XML_EMPS", line 18
ORA-06512: at line 2
Can anyone describe me this error
Thanks.
Best Regards.SQL> /* Creating Your table */
SQL> CREATE TABLE IBSCOLYTD
2 (
3 ACTNOI VARCHAR2 (8),
4 MEMONOI NUMBER (7,0),
5 MEMODTEI DATE,
6 AMOUNTI NUMBER (8,0),
7 BRCDSI NUMBER (4,0),
8 TYPEI NUMBER (4,0),
9 TRANSMONI NUMBER (6,0)
10 );
Table created.
SQL> CREATE OR REPLACE PROCEDURE insert_xml_emps(p_directory in varchar2,
2 p_filename in varchar2,
3 vtableName in varchar2) as
4 v_filelocator BFILE;
5 v_cloblocator CLOB;
6 l_ctx DBMS_XMLSTORE.CTXTYPE;
7 l_rows NUMBER;
8 v_amount_to_load NUMBER;
9 dest_offset NUMBER := 1;
10 src_offset NUMBER := 1;
11 lang_context NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
12 warning NUMBER;
13 BEGIN
14 dbms_lob.createtemporary(v_cloblocator, true);
15 v_filelocator := bfilename(p_directory, p_filename);
16 dbms_lob.open(v_filelocator, dbms_lob.file_readonly);
17 v_amount_to_load := DBMS_LOB.getlength(v_filelocator);
18 --- ***This line is changed*** ---
19 DBMS_LOB.LOADCLOBFROMFILE(v_cloblocator,
20 v_filelocator,
21 v_amount_to_load,
22 dest_offset,
23 src_offset,
24 0,
25 lang_context,
26 warning);
27
28 l_ctx := DBMS_XMLSTORE.newContext(vTableName);
29 DBMS_XMLSTORE.setRowTag(l_ctx, 'ROWSET');
30 DBMS_XMLSTORE.setRowTag(l_ctx, 'IBSCOLYTD');
31 -- clear the update settings
32 DBMS_XMLStore.clearUpdateColumnList(l_ctx);
33 -- set the columns to be updated as a list of values
34 DBMS_XMLStore.setUpdateColumn(l_ctx, 'ACTNOI');
35 DBMS_XMLStore.setUpdateColumn(l_ctx, 'MEMONOI');
36 DBMS_XMLStore.setUpdatecolumn(l_ctx, 'MEMODTEI');
37 DBMS_XMLStore.setUpdatecolumn(l_ctx, 'AMOUNTI');
38 DBMS_XMLStore.setUpdatecolumn(l_ctx, 'BRCDSI');
39 DBMS_XMLStore.setUpdatecolumn(l_ctx, 'TYPEI');
40 DBMS_XMLStore.setUpdatecolumn(l_ctx, 'TRANSMONI');
41 -- Now insert the doc.
42 l_rows := DBMS_XMLSTORE.insertxml(l_ctx, v_cloblocator);
43 DBMS_XMLSTORE.closeContext(l_ctx);
44 dbms_output.put_line(l_rows || ' rows inserted...');
45 dbms_lob.close(v_filelocator);
46 DBMS_LOB.FREETEMPORARY(v_cloblocator);
47 END;
48 /
Procedure created.
SQL> BEGIN
2 insert_xml_emps('TEST_DIR','load.xml','IBSCOLYTD');
3 END;
4 /
PL/SQL procedure successfully completed.
SQL> SELECT * FROM ibscolytd;
ACTNOI MEMONOI MEMODTEI AMOUNTI BRCDSI TYPEI TRANSMONI
28004125 251942 05-SEP-92 400 513 1 0
28004125 251943 04-OCT-92 400 513 1 0
SQL> -
IDOC_XML_FROM_FILE Error while loading XML as IDOC to ECC 6.0
I have successfully converted IDOC to XML file.
Getting Error while converting XML back to IDOC in ECC 6.0 using function: IDOC_XML_FROM_FILE
Segment EDI_DS40 is not defined.....I am really not sure about the error as this idoc was previously posted to the same ECC 6.0...
Exception SEGMENT_ERROR
Message ID: EA Message number: 721
Message:
The segment EDI_DS40 is not defined.
Secondly is there a way to load XML file via WE19?
Tx
SalmanThanks alot Oliver for taking a stab...
I created the XML file from within SAP by using the functionailty of this function module:-
IDOC_XML_TRANSFORM
I created my ZIDOC_XML_TRANSFORM and just added file download facility in that the rest is the same as the orignal function.
Is there any way for me to supress generation of ED_DS40 segements in the XML file?? -
Error while loading XML files into scott user
Hi All,
I'm new to xml files. I need to load xml files into database through OWB.
I have xml file in my local machine & am trying to load into table PO of Scott. Scott is registered as repository user.
Followed same steps as specified in userguide.
But, when executing the procedure ( in two ways one as just table name, and other as user.table name) it is showing the below error:
Procedure is:(1)--with username.tablename
begin
wb_xml_load(
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>&&SAMPLES_DIR.sample1.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target dateFormat="yyyy.MM.dd">scott.PO</target>'||
'</targets>'||
'</OWBXMLRuntime>'
end;
ERROR at line 1:
ORA-20006: Error occurred while truncating target database object SCOTT.PO.
Base exception: ORA-01031: insufficient privileges
ORA-06512: at "OWBSYS.WB_XML_LOAD_F", line 12
ORA-06512: at "OWBSYS.WB_XML_LOAD", line 4
ORA-06512: at "SCOTT.SAMPLE1", line 3
ORA-06512: at line 1
Procedure is:(2) with out username
begin
wb_xml_load(
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>&&SAMPLES_DIR.sample1.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target dateFormat="yyyy.MM.dd">PO</target>'||
'</targets>'||
'</OWBXMLRuntime>'
end;
ERROR at line 1:
ORA-20006: Error occurred while truncating target database object PO.
Base exception: ORA-00942: table or view does not exist
ORA-06512: at "OWBSYS.WB_XML_LOAD_F", line 12
ORA-06512: at "OWBSYS.WB_XML_LOAD", line 4
ORA-06512: at line 2
xml file:
<ROWSET>
<ROW>
<ID>100</ID>
<ORDER_DATE>2000.12.20</ORDER_DATE>
<SHIPTO_NAME>Adrian Howard</SHIPTO_NAME>
<SHIPTO_STREET>500 Marine World Parkway</SHIPTO_STREET>
<SHIPTO_CITY>Redwood City</SHIPTO_CITY>
<SHIPTO_STATE>CA</SHIPTO_STATE>
<SHIPTO_ZIP>94065</SHIPTO_ZIP>
</ROW>
</ROWSET>
Note: Everything works fine if I create PO table in OWBSYS user and execute the procedurein OWBSYS user. OWBSYS.PO table will be loaded.
What privileges are missing, what shouldI do if I want to execute the procedure from scott user and load the table of scott.
Thanks in advance for the help.
Regards,
JoshnaHi Joshna,
Please follow below steps to load xml file to oracle database.
1.First connect to owb (Design Center) through your repository owner user (ex : REP_OWNER).
2. Import WB_XML_LOAD procedure . and exit to repository owner.
3. connect to owb design center through your repository user (ex : REP_USER)
Create New mapping and drag one Constant Operator and create one attribute, paste / edit following code
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>E:\SOURCE\emp.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target truncateFirst = "FALSE" dateFormat="yyyy.MM.dd">rep_user.emp</target>'||
'</targets>'||
'</OWBXMLRuntime>'
4. Drag pre mapping operator and select WB_XML_LOAD procedure
5. Connect Constant Operator attribute to pre mapping operator.
6. Drag two dummy tables and connect source to target. (ex : drag t1 (table) tab two times and connect.
7. Validate and deploy the mapping.
8. grant necessary grant command to rep_owner user to rep_user user.
(Note : target truncateFirst = "FALSE" by default truncate the table. So you have to give grant privileges
To rep_user , select ,insert, delete privileges.
9. Execute the mapping , and check EMP table. (Note : before loading EMP table delete all records ).
10 . If you want more description please go through the below link
http://download.oracle.com/docs/html/A95931_01/apf.htm
Regards
Venkat -
Load XML records in a normal table
Good afternoon all,
I have a very simple question:
I get a XML file and want to store that data in my Oracle database in a normal table.
I have seen so many answers everywhere, varying from LOBs and using XDB etc.
What i don't understand is why it is so difficult.
When i want to load a CSV file in a table I make a very small Control File CTL and from the command prompt / command line I run the SQL Loader.
Control file:
load data
infile 'import.csv'
into table emp
fields terminated by "," optionally enclosed by '"'
( empno, empname, sal, deptno )
command:
sqlldr user/password@SID control=loader_Control_File.ctl
Next I connect to the database and run SQL query:
select * from emp;
and i see my data as usual, I can make Crystal Reports on it, etc etc
I really don't understand why this can't be done with an XML file
Oracle know the fields in the table EMP
The xml file has around every field the <EMPNO> and </EMPNO>
Can't be easier than that I would say.
I can understand Oracle likes some kind of description of the XML table, so reference to a XSD file would be understandable.
But all examples are describing LOB things (whatever that is)
Who can help me to get XML data in a normal table?
Thanks
FrankHi Frank,
What i don't understand is why it is so difficult.Why do you think that?
An SQL*Loader control file might appear very small and simple to you, but you don't actually see what happens inside the loader itself, I guess a lot of complex operations (parsing, datatype mapping, memory allocation etc.).
XML, contrary to a CSV format, is a structured, well standardized language and could handle far more complex documents than row-organized CSV files.
I think it naturally requires a few extra work (for a developer) to describe what we want to do out of it.
However, using an XML schema is not mandatory to load XML data into a relational table.
It's useful if you're interested in high-performance loading and scalability, as it allows Oracle to fully understand the XML data model it has to deal with, and make the correct mapping with SQL types in the database.
Furthermore, now with 11g BINARY XMLType, performance has been improved with or without schema.
Here's a simple example, loading XML file "import.xml" into table MY_EMP.
Do you find it difficult? ;)
SQL> create or replace directory test_dir as 'D:\ORACLE\test';
Directory created
SQL> create table my_emp as
2 select empno, ename, sal, deptno
3 from scott.emp
4 where 1 = 0
5 ;
Table created
SQL> insert into my_emp (empno, ename, sal, deptno)
2 select *
3 from xmltable('/ROWSET/ROW'
4 passing xmltype(bfilename('TEST_DIR', 'import.xml'), nls_charset_id('CHAR_CS'))
5 columns empno number(4) path 'EMPNO',
6 ename varchar2(10) path 'ENAME',
7 sal number(7,2) path 'SAL',
8 deptno number(2) path 'DEPTNO'
9 )
10 ;
14 rows inserted
SQL> select * from my_emp;
EMPNO ENAME SAL DEPTNO
7369 SMITH 800.00 20
7499 ALLEN 1600.00 30
7521 WARD 1250.00 30
7566 JONES 2975.00 20
7654 MARTIN 1250.00 30
7698 BLAKE 2850.00 30
7782 CLARK 2450.00 10
7788 SCOTT 3000.00 20
7839 KING 5000.00 10
7844 TURNER 1500.00 30
7876 ADAMS 1100.00 20
7900 JAMES 950.00 30
7902 FORD 3000.00 20
7934 MILLER 1300.00 10
14 rows selected
import.xml :
<?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<SAL>800</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW>
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<SAL>1600</SAL>
<DEPTNO>30</DEPTNO>
</ROW>
<!-- more rows here -->
<ROW>
<EMPNO>7934</EMPNO>
<ENAME>MILLER</ENAME>
<SAL>1300</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
</ROWSET>
Who can help me to get XML data in a normal table?If you have a specific example, feel free to post it, including the following information :
- structure of the target table
- sample XML file
- database version (select * from v$version)
Hope that helps.
Edited by: odie_63 on 9 mars 2011 21:22
Maybe you are looking for
-
Hi all, in a scenario I have to do some complex summarizations and mappings and so on. Therefore I implemented an ABAP Mapping within a class. For the conversion I use a simple Transformation to have the data after it in an internal table. Then I'm d
-
Am I correct that there's no "words only" view supported by Pages? Why can't I press a key and toggle between the full layout I can see now and a window with all the text in a screen-optimized font (e.g., Lucida Sans 12 pt.) and minimal formatting (e
-
Error regarding share relocation object or Position Independent Code.
Problem related to Shared Object relocation or Position Independent code. For reference: Specification for -b option with ld (link editor/Runtime linker) ======================================================================== In dynamic mode only, d
-
Generic icons in Yosemite sidebar
I have seen lots of comments about the colorless folder icons in the sidebar but I haven't seen anything about the fact that user custom icons on folders disappear when dragged to the sidebar. (I went from 10.6.8 to Yosemite so I don't know if this h
-
Making a bootable windows 7 usbstick (solved)
Hello I need to make a bootable usb stick with windows 7, but I don't seem to able to do so. I've tried to just make a bootable ntfs partition on my usb stick and copy the contents of the windows 7 iso I have, but when I try to boot it, nothing simpl