Adding data in an XML file
how to add data in xml file from textbox in c# without overwriting???
Hi,
As Andy said, add data to an xml file is overwriting, if you mean append data to xml file, please look this article:
http://codesamplez.com/programming/linq-to-xml-tutorial, Since this issue is more related to ASP.net, you could also ask this issue in asp.net forum:
http://forums.asp.net/
Best Regards,
Jambor
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
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. -
How to export a data as an XML file from oracle data base?
could u pls tell me the step by step procedure for following questions...? how to export a data as an XML file from oracle data base? is it possible? plz tell me itz urgent requirement...
Thankz in advance
BalaSQL> SELECT * FROM v$version;
BANNER
Oracle DATABASE 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS FOR 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
5 rows selected.
SQL> CREATE OR REPLACE directory utldata AS 'C:\temp';
Directory created.
SQL> declare
2 doc DBMS_XMLDOM.DOMDocument;
3 xdata XMLTYPE;
4
5 CURSOR xmlcur IS
6 SELECT xmlelement("Employee",XMLAttributes('http://www.w3.org/2001/XMLSchema' AS "xmlns:xsi",
7 'http://www.oracle.com/Employee.xsd' AS "xsi:nonamespaceSchemaLocation")
8 ,xmlelement("EmployeeNumber",e.empno)
9 ,xmlelement("EmployeeName",e.ename)
10 ,xmlelement("Department",xmlelement("DepartmentName",d.dname)
11 ,xmlelement("Location",d.loc)
12 )
13 )
14 FROM emp e
15 , dept d
16 WHERE e.DEPTNO=d.DEPTNO;
17
18 begin
19 OPEN xmlcur;
20 FETCH xmlcur INTO xdata;
21 CLOSE xmlcur;
22 doc := DBMS_XMLDOM.NewDOMDocument(xdata);
23 DBMS_XMLDOM.WRITETOFILE(doc, 'UTLDATA/marco.xml');
24 end;
25 /
PL/SQL procedure successfully completed.
. -
How to update data in a xml file.
I am able to retrieve data from a xml file but not able to update data. Also how can i add or delete node from a xml file.
Hi,
For some time I have also been trying to do the same thing with no success. So far I have tried a few approaches like $.post functions $.ajax post functions and HTML5 fileWriter functions. I am not well aware of the web development techniques but as fas as I understand the post or update of the json file should be done on the serverside mainly because of security issues. I am not sure how appbuilder works entirely and if there is any way to do this.
Have you managed to find a solution ?
(P.S. my goal is to update my chart data which is of course json file. So the idea here is to get some values from the user input and update the json file values then refresh the chart and display it with the new values).
Best Regards,
A.Dyankov. -
Create a Purchase order using the BAPI using the data in the XML file.
Hello Gurus,
here is the scenario can anyone help me how to proceed explaining the procedure?
Create a Purchase order using the BAPI using the data in the XML file.
comprehensive explanations are appreciated.
thanks in advance.hi,
first use fm "bapi_po_create".
then use fm "BAPI_ACC_GL_POSTING_POST"
The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM). -
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 -
How to edit the existing data in the XML file from java programming.
Hi all
i am able to create XML file with the sample data as below from java programming.
i need sample code on how to edit the existing data in the XML file?
for example
<?xml version="1.0"?>
<mydata>
<data1>
<key1>467</key1>
<name1>Paul</name1>
<id1>123</id1>
</data1>
<data2>
<key2>467</key2>
<name2>Paul</name2>
<id2>123</id2>
</data2>
</mydata>
i am able to insert the data in the XML.
now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
Regards
Sunil
[points will be always rewardable]hi
u need a parser or validate the xml file for to read the xml file from java coding u need for this
xml4j.jar u can download this file from here
http://www.alphaworks.ibm.com/tech/xml4j
or we can use the SAX(simple API for XML)
some sample applications for this
http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
http://www.xml-training-guide.com/e-xml44.html
let me know u need any other info
bvr -
How to fetch the relational data from the xml file registered in xdb
Hi,
I have to register the xml file into the xdb repository and i have to fetch the data of the xml file as relational structure through the select statement .
i used the below query to register the xml file in xdb.
DECLARE
v_return BOOLEAN;
BEGIN
v_return := DBMS_XDB.CREATERESOURCE(
abspath => '/public/demo/xml/db_objects.xml',
data => BFILENAME('XML_DIR', 'db_objects.xml')
COMMIT;
END;
Now i have to fetch the values in the xml file as relational data .
whether it is possible ?
can any one help me.
Regards,
suresh.When you transform your XMLdata to a xmltype you can do something like this for example:
select
extractvalue(value(p),'/XMLRecord/Session_Id') session_id,
extractvalue(value(p),'/XMLRecord/StatementId') StatementId,
extractvalue(value(p),'/XMLRecord/EntryId') EntryId
from
table(xmlsequence(extract(xmltype('
<XMLdemo>
<FormatModifiers><FormatModifier>UTFEncoding</FormatModifier></FormatModifiers>
<XMLRecord>
<Session_Id>117715</Session_Id>
<StatementId>6</StatementId>
<EntryId>1</EntryId>
</XMLRecord>
</XMLdemo>
'),'/XMLdemo/*'))) p
where extractvalue(value(p),'/XMLRecord/Session_Id') is not null;
For this sample I've put a readable XML in plain text and convert it to xmltype so you can run it on your own database. -
IDOC (Source) to JDA data base(thru XML files)
hi,
Source structure is a IDOC. I have to pass IDOC data to Function module(Z function). it will return some hierarchy levels. (For example if it's generates 12 hierarchy levels), i have to pass each hierarchy level data to one XML file.
According to my understand source is IDOC and target is some intermediate data type. In between i am calling user defined function. it will generates the hierarchy levels and i have to pass the hierarchy level data to intermediate data type.
this logic is correct or not?
if this is correct how to pass data from user defined function to intermediate data type.Windows app should work. Web app will not. See
[1218745 - Chart backgrounds are not transparent when report is viewed over the web |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
Also below is copy of a reply to another forum thread I did on what I think is a similar issue:
The limitation is specifically with viewing reports on the web. The trouble is that when you view a report in a web browser, we convert each graph on the report into a picture file, and display that picture in the HTML page. In this case, if you have one picture file on top of another, the top one will cover the bottom one. The only way to make it look transparent as it does in Crystal is to combine both charts into one picture. Unfortunately we don't have the ability to put two pictures into one file, that's simply one of our limitations. At this point the only work around is to export the report to PDF and view that instead.
Ludek -
Application to Read and Write the Configuration Data from a xml file
Hi,
I have to develop a Webdynpro application that will do the following:
Read the Configuration data from an xml file
If stored in a file , and the file is not found, prompt the user to provide the file location.
Pre-Populate the screen(table) with the configuration data
Allow the user to edit the data
Store the configuration data when the user hits the Save button
The config xml file details are as follows:
Regardless of the location of the configuration data, the following fields will be stored
Application (string) will always contain u201CSFA_EDOCSu201D
Key (string) eg LDAP_USER, DB_PREFIX, etc.
Type (character) u201CPu201D = Plain Text, u201CEu201D = Encrypted
Value (string)
Since I am new to WD, I would require help on this.
Please help.Its Urgent.
Regards,
Vaishali.
Edited by: vaishali dhayalan on Sep 19, 2008 8:29 AMHi,
I have to develop a Webdynpro application that will do the following:
Read the Configuration data from an xml file
If stored in a file , and the file is not found, prompt the user to provide the file location.
Pre-Populate the screen(table) with the configuration data
Allow the user to edit the data
Store the configuration data when the user hits the Save button
The config xml file details are as follows:
Regardless of the location of the configuration data, the following fields will be stored
Application (string) will always contain u201CSFA_EDOCSu201D
Key (string) eg LDAP_USER, DB_PREFIX, etc.
Type (character) u201CPu201D = Plain Text, u201CEu201D = Encrypted
Value (string)
Since I am new to WD, I would require help on this.
Please help.Its Urgent.
Regards,
Vaishali.
Edited by: vaishali dhayalan on Sep 19, 2008 8:29 AM -
Oracle data to generate XML file
How can I extract Oracle data to generate XML file using pl/sql?
I am using the following version
Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
PL/SQL Release 8.1.5.0.0 - Production
CORE Version 8.1.3.0.0 - Production
TNS for Solaris: Version 8.1.5.0.0 - Production
NLSRTL Version 3.4.0.0.0 - ProductionI don't know if you already resolved this but here's a sample I got.
-- Akadia Create XML docs
-- (c) Akadia AG 2002
-- Requires Oracle 8i or 9i
-- For larger amounts of nodes use 8.1.7.3 with bug fix 2104071 or 9.2
-- Create XML docs using XMLDOM package.
CONNECT sys/manager@sid
GRANT javauserpriv to scott;
GRANT javasyspriv to scott;
GRANT EXECUTE ON xmldom TO scott;
CREATE SYNONYM scott.xmldom FOR SYS.xmldom;
CONNECT scott/tiger@sid
DECLARE
doc xmldom.DOMDocument;
main_node xmldom.DOMNode;
root_node xmldom.DOMNode;
user_node xmldom.DOMNode;
item_node xmldom.DOMNode;
root_elmt xmldom.DOMElement;
item_elmt xmldom.DOMElement;
item_text xmldom.DOMText;
CURSOR get_users(p_deptno NUMBER) IS
SELECT empno
, ename
, deptno
, rownum
FROM emp
WHERE deptno = p_deptno;
BEGIN
-- get document
doc := xmldom.newDOMDocument;
-- create root element
main_node := xmldom.makeNode(doc);
root_elmt := xmldom.createElement(
doc
, 'EMPSET'
-- xmldom.setAttribute(root_elmt, 'xmlns', 'http://www.akadia.com/xml/soug/xmldom');
-- xmldom.setAttribute(root_elmt, 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
-- xmldom.setAttribute(root_elmt, 'xsi:schemaLocation', 'http://www.akadia.com/xml/soug/xmldom/emp.xsd');
root_node := xmldom.appendChild(
main_node
, xmldom.makeNode(root_elmt)
FOR get_users_rec IN get_users(10) LOOP
-- create user element with rownum as attribute
item_elmt := xmldom.createElement(
doc
, 'EMP'
xmldom.setAttribute(
item_elmt
, 'num'
, get_users_rec.rownum
user_node := xmldom.appendChild(
root_node
, xmldom.makeNode(item_elmt)
-- create user element: EMP_NO
item_elmt := xmldom.createElement(
doc
, 'EMP_NO'
item_node := xmldom.appendChild(
user_node
, xmldom.makeNode(item_elmt)
item_text := xmldom.createTextNode(
doc
, get_users_rec.empno
item_node := xmldom.appendChild(
item_node
, xmldom.makeNode(item_text)
-- create user element: NAME
item_elmt := xmldom.createElement(
doc
, 'NAME'
item_node := xmldom.appendChild(
user_node
, xmldom.makeNode(item_elmt)
item_text := xmldom.createTextNode(
doc
, get_users_rec.ename
item_node := xmldom.appendChild(
item_node
, xmldom.makeNode(item_text)
-- create user element: DEPT_NO
item_elmt := xmldom.createElement(
doc
, 'DEPT_NO');
item_node := xmldom.appendChild(
user_node
, xmldom.makeNode(item_elmt)
item_text := xmldom.createTextNode(
doc
, get_users_rec.deptno
item_node := xmldom.appendChild(
item_node
, xmldom.makeNode(item_text)
END LOOP;
-- write document to file using default character set from database
xmldom.writeToFile(
doc
, '/tmp/xml/docSample.xml'
-- free resources
xmldom.freeDocument(doc);
END;
-- deal with exceptions
EXCEPTION
WHEN xmldom.INDEX_SIZE_ERR THEN
raise_application_error(-20120, 'Index Size error');
WHEN xmldom.DOMSTRING_SIZE_ERR THEN
raise_application_error(-20120, 'String Size error');
WHEN xmldom.HIERARCHY_REQUEST_ERR THEN
raise_application_error(-20120, 'Hierarchy request error');
WHEN xmldom.WRONG_DOCUMENT_ERR THEN
raise_application_error(-20120, 'Wrong doc error');
WHEN xmldom.INVALID_CHARACTER_ERR THEN
raise_application_error(-20120, 'Invalid Char error');
WHEN xmldom.NO_DATA_ALLOWED_ERR THEN
raise_application_error(-20120, 'Nod data allowed error');
WHEN xmldom.NO_MODIFICATION_ALLOWED_ERR THEN
raise_application_error(-20120, 'No mod allowed error');
WHEN xmldom.NOT_FOUND_ERR THEN
raise_application_error(-20120, 'Not found error');
WHEN xmldom.NOT_SUPPORTED_ERR THEN
raise_application_error(-20120, 'Not supported error');
WHEN xmldom.INUSE_ATTRIBUTE_ERR THEN
raise_application_error(-20120, 'In use attr error');
END;
/ -
Loading data dynamically to XML file
Hi ,
1) in my project i need an xml file that loads data
dynamically,i will get data using HttpService,
How to do this ?Please Help me its urgent.
2)Can i create an xml file that loads data dynamically using
Flex???Just need to clarify if you mean to load your data FROM an
XML file, which is relatively straightforward, or if you're saying
you want to WRITE an XML file based on something that's happened in
your application and store it on a server somewhere. -
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; -
XML..: Problem getting the data in the XML-file..
I'm developing a flash-file for my customer to use when
displaying list of products he's selling.
His list of products is inside a XML-file and he want me to
display an overview of the products inside a datagrid, so when you
click on the product you're interested in the productinfo will be
displayed.
But.. I'm having problems grabbing the data I want as it
seems to me that I have to use the unik ID's for each products to
get the data I want. I've tried adding the unik ID-code to my
action script but it still won't work.
Here's a part of the XML-code:
<Tooldata>
<Store name="N/A" zipcode="0033450" city="N/A" url="N/A"
phone="N/A" fax="N/A" email="N/A">
<Tool unikID="5_0022" control="14" cmnd="update">
<Toolgroupe>Hammer</Toolgroupe>
<Brand>Knipps</Brand>
<Model>K55_Knipps</Model>
<Price>35€</Price>
<Weight>N/A</Weight>
<Soldout>0</Soldout>
<Color>Red/Black</Color>
<Images>
<Images image="5_0022.jpg" prioritet="1" gen_id="16"
desc="MainImage"/>
<Images image="5_0022_1.jpg" prioritet="2" gen_id="16"
desc="Image 1"/>
<Images image="5_0022_2.jpg" prioritet="3" gen_id="16"
desc="Image 2"/>
<Images image="5_0022_3.jpg" prioritet="4" gen_id="16"
desc="Image 3"/>
</Images>
Now, the code above is only one item/product. But there are
several proucts listed in the XML-file and I find it hard to get
the product and the product info that I want to be displayed.
Here's my action script:
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("ToolData.xml"));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
ParseBildata(xmlData);
function ParseTooldata(TooldataInput:XML):void {
trace("XML Output");
trace("------------------------");
trace(TooldataInput.Store);
If I want to trace the images I just write
"trace(TooldataInput.Store.Images);
But if I want to trace one unik tool it's impossible. Well,
maybe not impossible.. I just don't know how to do just that.
When you trace (TooldataInput.Store); you get all the tools
at that store. But how do I trace only one tool using the unikID??
Thanks a lot in advance!Ace,
When using E4X if you have multiple nodes at the same level
you should be able to access them as an XMLList. Looking at your
XML you should be able to access each <Tool> node as:
TooldataInput.Store.Tool[0];
TooldataInput.Store.Tool[1];
or as an entire list
TooldataInput.Store.children()
WL -
Best Practices for Accessing the Configuration data Modelled as XML File in
Hi,
I refer the couple of blof posts/Forum threads on How to model and access the Configuration data as XML inside OSB.
One of the easiest and way is to
Re: OSB: What is best practice for reading configuration information
Another could be
Uploading XML data as .xq file (Creating .xq file copy paste all the Configuration as XML )
I need expert answers for following.
1] I have .xsd file which is representing the Configuration data. Structure of XSD is
<FrameworkConfig>
<Config type="common" key="someKey">proprtyvalue</Config>
<FrameworkConfig>
2] As my project will move from one env to another the property-value will change according to the Environment...
For Dev:
<FrameworkConfig>
<Config type="common" key="someKey">proprtyvalue_Dev</Config>
<FrameworkConfig>
For Stage :
<FrameworkConfig>
<Config type="common" key="someKey">proprtyvalue_Stage</Config>
<FrameworkConfig>
3] Let say I create the following Folder structure to store the Configuration file specific for dev/stage/prod instance
OSB Project Folder
|
|---Dev
|
|--Dev_Config_file.xml
|
|---Stage
|
|--Stahe_Config_file.xml
|
|---Prod
|
|-Prod_Config_file.xml
4] I need a way to load these property file as xml element/variable inside OSb message flow.?? I can't use XPath function fn:doc("URL") coz I don't know exact path of XMl on deployed server.
5] Also I need to lookup/model the value which will specify the current server type(Dev/Stage/prod) on which OSB MF is running. Let say any construct which will act as a Global configuration and can be acccessible inside the OSb message flow. If I get the vaalue for the Global variable as Dev means I will load the xml config file under the Dev Directory @runtime containing key value pair for Dev environment.
6] This Re: OSB: What is best practice for reading configuration information
suggest the designing of the web application which will serve the xml file over the http protocol and getting the contents into variable (which in turn can be used in OSB message flow). Can we address this problem without creating the extra Project and adding the Dependencies? I read configuration file approach too..but the sample configuration file doesn't show entry of .xml file as resources
Hope I am clear...I really appreciate your comments and suggestion..
Sushil
Edited by: Sushil Deshpande on Jan 24, 2011 10:56 AMIf you can enforce some sort of naming convention for the transport endpoint for this proxy service across the environments, where the environment name is part of the endpoint you may able to retrieve it from $inbound in the message pipeline.
eg. http://osb_host/service/prod/service1 ==> Prod and http://osb_host/service/prod/service2 ==> stage , then i think $inbound/ctx:transport/ctx:uri can give you /service/prod/service1 or /service/stage/service1 and applying appropriate xpath functions you will be able to extract the environment name.
Chk this link for details on $inbound/ctx:transport : http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1080822
Maybe you are looking for
-
I downloaded and ran the update to Firefox. It said it was successful and then the welcome page etc. came up. However, after I had closed down and started up again the "old" version came up when I clicked on the Firefox icon with the usual comment th
-
Mail and mail search horrible since 'upgrade' to 7.5.2
no idea what cat i'm dealing with. went from 7.2.x (might have been 11, can't remember) to 7.5.2. this whole feline thing is beyond me , like going to starbucks and being supposed to order a vente. i get large. getting used to the new offerings on s
-
I created a BSP with the following values. Staff Contractor Staff/Contractor Role Staff/Contractor No Name Contact No staff/contractor : radiobutton Staff/Contractor Role -char 40 Staff/Contractor No -char10 Name - char40 Contact No
-
Mplayer and VirtualBox error after installing ATI Drivers
I recently switched from the Open Source drivers for my ATI video card. Since that time some programs are refusing to load. I switched to the Catalyst repository to install the new drivers for my card. The specific error message I get when running t
-
How to use external .tld files with uix
Hey, I have a set of custom .tld files and that i was to use in my UIX pages. I got them to work correctly if I am using jsp files but for some reason it doesn't recognize the tags when they are in uix pages I far as I can tell, UIX actually requires