Retrieve data from XML
Hello,
I am new to this forum. I have an XMl document as below:
<gallery>
<image>
<title>pic1</title>
<text> txt1 <text>
</image>
<image>
<title>pic2</title>
<text> txt2 <text>
</image>
</gallery>
I want to fetch the value of "text" node and print it.Can anyone help?
-Akshay
Hello,
Thanks for your reply.
I need to retireve the image soruce and image text dynamically from xml. For that I am trying to read the XML using Http Request and then in result handler I am getting it in Array Collection: but afterwards I am strugelling to get individual element from array collection: here's my code:
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
[Bindable]
public var galleryData:ArrayCollection;
protected function resultHandler(event:ResultEvent):void
//getting XML in array collection
galleryData = event.result.gallery.images;
//tried getItemAt (index) but it's not working not sure how to progress further
// fault event handler for employeeService HTTPService call
private function faultHandler(event:FaultEvent):void {
// Add code here for what to do when there is an error retrieving data
]]>
</fx:Script>
<fx:Declarations>
<mx:HTTPService id="galleryService"
url="data/gallery.xml"
result="resultHandler(event)"
fault="faultHandler(event)"/>
</fx:Declarations>
and I am struggeling to get individual values from that array collection. tried getItemAt (index) but it's not working not sure how to progress further
-Akshay
Similar Messages
-
Retrieving data from XML containing namespaces?
Hi,
I am using Yahoo Local Search Service which returns the XML
response. I want to retrieve data from the XML that I received. I
stuck at this point and unable to retrieve the response in to
datagrid. Does the namespaces in XML matter while retrieving data?
The response XML is as follows
<ResultSet xsi:schemaLocation="urn:yahoo:lcl
http://api.local.yahoo.com/LocalSearchService/V3/LocalSearchResponse.xsd"
totalResultsAvailable="224" totalResultsReturned="1"
firstResultPosition="1" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:yahoo:lcl">
<ResultSetMapUrl>
http://maps.yahoo.com/broadband/?q1=San+Jose%2C+CA+95112&tt=starbucks&tp=1</Result SetMapUrl>
<Result id="21590724">
<Title>Starbucks</Title>
<Address>145 W Santa Clara St</Address>
<City>San Jose</City>
<State>CA</State>
<Phone>(408) 288-8803</Phone>
<Latitude>37.335236</Latitude>
<Longitude>-121.892765</Longitude>
<Rating>
<AverageRating>4</AverageRating>
<TotalRatings>3</TotalRatings>
<TotalReviews>2</TotalReviews>
<LastReviewDate>1198029377</LastReviewDate>
<LastReviewIntro>My previous review had incorrect
data. That was not true, I am sorry, I didn't know. As far as food
and drink goes, Starbucks is pretty good.</LastReviewIntro>
</Rating>
<Distance>0.96</Distance>
<Url>
http://local.yahoo.com/info-21590724-starbucks-san-jose</Url>
<ClickUrl>
http://local.yahoo.com/info-21590724-starbucks-san-jose</ClickUrl>
<MapUrl>
http://maps.yahoo.com/maps_result?q1=145+W+Santa+Clara+St+San+Jose+CA&gid1=21590724</M apUrl>
<BusinessUrl>
http://www.starbucks.com/</BusinessUrl>
<BusinessClickUrl>
http://www.starbucks.com/</BusinessClickUrl>
<Categories>
<Category id="96926219">Cafes</Category>
<Category id="96926236">Restaurants</Category>
<Category id="96926169">Coffee Houses</Category>
</Categories>
</Result>
</ResultSet>
The code that I am writing to get Title and Address is as
follows.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="vertical"
backgroundAlpha="0" backgroundColor="#FFFFFF">
<mx:HTTPService
id="weatherService"
url="
http://local.yahooapis.com/LocalSearchService/V3/localSearch"
resultFormat="e4x"
result="resultHandler(event);"/>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var myResult:XML ;
private var temp:XMLNode;
private var list:ArrayCollection;
public function requestWeather():void {
weatherService.cancel();
var params:Object = new Object();
params.appid = "YahooDemo";
params.query = "starbucks";
params.zip = "95112";
params.results = "1"
weatherService.send(params);
public function resultHandler(event:ResultEvent):void {
myResult = XML( event.result);
temp = myResult.Result;
list = ArrayCollection(event.result);
]]>
</mx:Script>
<mx:Form width="400">
<mx:FormItem label="Get Local Data">
<mx:Button label="Get Data"
click="requestWeather();"/>
</mx:FormItem>
<mx:FormItem label="Address">
<mx:Text text="{myResult.Result.Address}"/>
</mx:FormItem>
<mx:FormItem label="Title">
<mx:Text text="{myResult.Result.Title}"/>
</mx:FormItem>
</mx:Form>
<mx:DataGrid
dataProvider="{myResult.Result}"
x="80" y="141" width="262" height="92"
id="shippingOptionsList" editable="false" enabled="true">
<mx:columns>
<mx:DataGridColumn headerText="Title" dataField="Title"
/>
<mx:DataGridColumn headerText="Address"
dataField="Address" />
</mx:columns>
</mx:DataGrid>
<mx:Label text="Response as it is"/>
<mx:TextArea id="resultFld" text="{myResult}" width="400"
height="152"/>
</mx:Application>
Can somebody help me to find where I am going wrong?
Thank you
-PranayHi Pranay,
It looks like your problem is indeed to do with the XML
namespace being used.
Try adding this line after the import statements:
namespace yahoo = "urn:yahoo:lcl";
(This is the namespace URI defined in the returned XML)
The result handler should then look like this:
public function resultHandler(event:ResultEvent):void {
use namespace yahoo;
myResult = XML( event.result);
temp = myResult.Result;
list = ArrayCollection(event.result); -
I have a scenario where I need to read data from database of xmltype (data type)
Table Structure :
Create table Ex_Tb (id number(30),emp_data XMLType );
I can save xml content in database,
Sample
insert into Ex_Tb values( 1, xmltype ('<?xml version="1.0" encoding="UTF-8" ?><userdata><uniqueid>54321</uniqueid><name>moorthi</name><age>25</age><city>Chennai</city></userdata>'));
Data inserted .
When retrieved from DB I see the data in the generated BO as given below:
<?xml version="1.0" encoding="UTF-8" ?>
<ExteOutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/pcbpel/adapter/db/Exte file:/C:/JDeveloper/mywork/Application1/Project1/xsd/Exte.xsd" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/Exte">
<ExteOutput>
<SDD_XML_REQ_DATA_GETCLOBVAL__><?xml version="1.0" encoding="UTF-8" ?><userdata><uniqueid>54321</uniqueid><name>moorthi</name><age>25</age><city>Chennai</city></userdata></SDD_XML_REQ_DATA_GETCLOBVAL__>
</ExteOutput>
</ExteOutputCollection>
My Question :
1. How to retrive values of individual tags contained within the embedded XML so that it can be mapped to a BO?
Basically I would like to map uniqueId, name,age,city from xml to a BO.
Rgds,
KrishnaHi Krishna,
I'm not sure but are you selecting the data from the XMLType column as given in the section Using XMLType in an SQL Statement in the below doc?
http://docs.oracle.com/cd/B10500_01/appdev.920/a96620/xdb04cre.htm#1030582
Regards,
Neeraj Sehgal -
How to retrieve data from xml file into obiee reports
Hi all,
I've got a situation here. A xml file is stored as blob in oracle database table. Now i need to retrieve data/info from that xml file into obiee reports. How am i supposed to proceed with this ?I will go for a table function:
http://gerardnico.com/wiki/database/oracle/table_function
In two words, you can create a function that behave as a table. Then you create a function to pick up your xml, you parse it and you send back the rows.
I know that Oracle has also a library for XML files but I never use it until now.
Success
Nico -
Unable to retrieve data from XML Type
Hi All,
I have table which has Column of type XMLType
XML Data is loaded in the table.
But when iam trying to extract not able to retrieve the data
Following is the select query i am using
SELECT CL.XMLDATA.EXTRACT('/ServiceType/entityName/text()').getStringVal() "entityname" FROM CL_DATA_SERVICE_TEMPLATE CL;
Any help / pointer will help me a lot... Thanks in advance
Sample XML File:
<?xml version="1.0" encoding="WINDOWS-1252"?>
<ServiceType xmlns="http://www.bmiasia.com/tBos/service_1_0">
<entityName>bmiasia.app.irb.servicetemplate12</entityName>
<systemVersion>4</systemVersion>
<displayName>
<bundle />
<key>AG-EVC</key>
</displayName>
<description>AG-EVC GROUP: AG-EVC</description>
<category entityName="bmiasia.app.service.category.ServiceRootCategory.AG_-_EVC_Services">
<operation>ADD</operation>
</category>
<entityMetaInfo name="bmiasia.app.irb.servicetemplate12.NC_PRODUCT_ID">
<type entityName="1"></type>
</entityMetaInfo>
<entityMetaInfo name="bmiasia.app.irb.servicetemplate12.NC_GL_PRODUCT_CODE">
<type entityName="2"></type>
</entityMetaInfo>
<entityMetaInfo name="bmiasia.app.irb.servicetemplate12.NC_GL_PROFIT_CENTRE">
<type entityName="3"></type>
</entityMetaInfo>
<entityMetaInfo name="bmiasia.app.irb.servicetemplate12.NC_SERVICE_CODE">
<type entityName="4"></type>
</entityMetaInfo>
<entityMetaInfo name="bmiasia.app.irb.servicetemplate12.RSP_EU_CUST_REF">
<type entityName="5"></type>
</entityMetaInfo>
<entityMetaInfo name="irbPkClass">
<type entityName="com.convergys.geneva.j2ee.product.ProductPK"></type>
</entityMetaInfo>
<entityMetaInfo name="irbId">
<type entityName="12"></type>
</entityMetaInfo>
<extensionProperty name="hasAddress" value="true"></extensionProperty>
<parent>
<itemkey>AllServiceTemplate</itemkey>
<name>AllServiceTemplate</name>
<targetEntity entityName="bmiasia.app.service.template.AllServiceTemplate"></targetEntity>
<number>0</number>
</parent>
<group>NORMAL</group>
<siu>
<itemkey>L2_OPTION</itemkey>
<operation>ADD</operation>
<name>L2_OPTION</name>
<required>true</required>
<source>INTERNAL</source>
<displayName>
<key>L2 Option</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>L3_OPTION</itemkey>
<operation>ADD</operation>
<name>L3_OPTION</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>L3 Option</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>QPEVPL_SERVICE_ID</itemkey>
<operation>ADD</operation>
<name>QPEVPL_SERVICE_ID</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>QP EVLP Service ID</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>QPEVPL_LAG_ID</itemkey>
<operation>ADD</operation>
<name>QPEVPL_LAG_ID</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>QP EVLP LAG ID</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>CO_NAME</itemkey>
<operation>ADD</operation>
<name>CO_NAME</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Aggregation Layer / Co Layer</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>INSTALL_SALUTAION</itemkey>
<operation>ADD</operation>
<name>INSTALL_SALUTAION</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Installation Salutation</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>INSTALL_LASTNAME</itemkey>
<operation>ADD</operation>
<name>INSTALL_LASTNAME</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Installlation Last Name</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>INSTALL_FIRSTNAME</itemkey>
<operation>ADD</operation>
<name>INSTALL_FIRSTNAME</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Installation First Name</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>INSTALL_TELEPHONE</itemkey>
<operation>ADD</operation>
<name>INSTALL_TELEPHONE</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Installation Telephone</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>INSTALL_MOBILE</itemkey>
<operation>ADD</operation>
<name>INSTALL_MOBILE</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Installation Mobile</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>INSTALL_EMAIL</itemkey>
<operation>ADD</operation>
<name>INSTALL_EMAIL</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Installlation Email</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>INSTALL_NOTIFICATION</itemkey>
<operation>ADD</operation>
<name>INSTALL_NOTIFICATION</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Installation Notification</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>TECHNICAL_SALUTAION</itemkey>
<operation>ADD</operation>
<name>TECHNICAL_SALUTAION</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Operational / Technical Salutation</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>TECHNICAL_LASTNAME</itemkey>
<operation>ADD</operation>
<name>TECHNICAL_LASTNAME</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Operational / Technical Last Name</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>TECHNICAL_FIRSTNAME</itemkey>
<operation>ADD</operation>
<name>TECHNICAL_FIRSTNAME</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Operational / Technical First Name</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>TECHNICAL_TELEPHONE</itemkey>
<operation>ADD</operation>
<name>TECHNICAL_TELEPHONE</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Operational / Technical Telephone</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>TECHNICAL_MOBILE</itemkey>
<operation>ADD</operation>
<name>TECHNICAL_MOBILE</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Operational / Technical Mobile</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>TECHNICAL_EMAIL</itemkey>
<operation>ADD</operation>
<name>TECHNICAL_EMAIL</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Operational / Technical Email</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>TECHNICAL_NOTIFICATION</itemkey>
<operation>ADD</operation>
<name>TECHNICAL_NOTIFICATION</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Operational / Technical Notification</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>SERVICE_ACTIVATION_PERIOD</itemkey>
<operation>ADD</operation>
<name>SERVICE_ACTIVATION_PERIOD</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Service Activation Period</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>REJECT_CODE</itemkey>
<operation>ADD</operation>
<name>REJECT_CODE</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Rejection Reason</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>APPLICATION_ACCEPTED</itemkey>
<operation>ADD</operation>
<name>APPLICATION_ACCEPTED</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Application Accepted</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.BooleanCheckSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>APPLICATION_REJECTED</itemkey>
<operation>ADD</operation>
<name>APPLICATION_REJECTED</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Application Rejected</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.BooleanCheckSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>APPROVAL_CODE</itemkey>
<operation>ADD</operation>
<name>APPROVAL_CODE</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Approval Code</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>PROCESSED_BY</itemkey>
<operation>ADD</operation>
<name>PROCESSED_BY</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Processed By</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>ACTUAL_RFS_DATE</itemkey>
<operation>ADD</operation>
<name>ACTUAL_RFS_DATE</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Actual RFS Date</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.DateSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>DISCLAIMER</itemkey>
<operation>ADD</operation>
<name>DISCLAIMER</name>
<required>false</required>
<source>INTERNAL</source>
<displayName>
<key>Disclaimer</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>NC_PRODUCT_ID</itemkey>
<operation>ADD</operation>
<name>NC_PRODUCT_ID</name>
<required>false</required>
<source>EXTERNAL</source>
<displayName>
<key>NC Product ID</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>NC_GL_PRODUCT_CODE</itemkey>
<operation>ADD</operation>
<name>NC_GL_PRODUCT_CODE</name>
<required>false</required>
<source>EXTERNAL</source>
<displayName>
<key>NC GL Product Code</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>NC_GL_PROFIT_CENTRE</itemkey>
<operation>ADD</operation>
<name>NC_GL_PROFIT_CENTRE</name>
<required>false</required>
<source>EXTERNAL</source>
<displayName>
<key>NC GL Profit Centre</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>NC_SERVICE_CODE</itemkey>
<operation>ADD</operation>
<name>NC_SERVICE_CODE</name>
<required>false</required>
<source>EXTERNAL</source>
<displayName>
<key>EUC ID</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
<scope>PRODUCT</scope>
</siu>
<siu>
<itemkey>bmiasia.app.irb.servicetemplate54</itemkey>
<operation>ADD</operation>
<name>bmiasia.app.irb.servicetemplate54</name>
<required>false</required>
<source>INTERNAL</source>
<equalsProvider>bmiasia.app.service.spi.AddSvcSIUEqualsProvider</equalsProvider>
<displayName>
<key>CIR Per 250Mbps CoS A</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.AdditionalServiceSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAdditionalService"></mapping>
<scope>SERVICE</scope>
<outSvcAttr>true</outSvcAttr>
</siu>
<siu>
<itemkey>bmiasia.app.irb.servicetemplate55</itemkey>
<operation>ADD</operation>
<name>bmiasia.app.irb.servicetemplate55</name>
<required>false</required>
<source>INTERNAL</source>
<equalsProvider>bmiasia.app.service.spi.AddSvcSIUEqualsProvider</equalsProvider>
<displayName>
<key>CIR Per 250Mbps CoS B</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.AdditionalServiceSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAdditionalService"></mapping>
<scope>SERVICE</scope>
<outSvcAttr>true</outSvcAttr>
</siu>
<siu>
<itemkey>bmiasia.app.irb.servicetemplate56</itemkey>
<operation>ADD</operation>
<name>bmiasia.app.irb.servicetemplate56</name>
<required>false</required>
<source>INTERNAL</source>
<equalsProvider>bmiasia.app.service.spi.AddSvcSIUEqualsProvider</equalsProvider>
<displayName>
<key>CIR Per 250Mbps CoS C</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.AdditionalServiceSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAdditionalService"></mapping>
<scope>SERVICE</scope>
<outSvcAttr>true</outSvcAttr>
</siu>
<siu>
<itemkey>bmiasia.app.irb.servicetemplate57</itemkey>
<operation>ADD</operation>
<name>bmiasia.app.irb.servicetemplate57</name>
<required>false</required>
<source>INTERNAL</source>
<equalsProvider>bmiasia.app.service.spi.AddSvcSIUEqualsProvider</equalsProvider>
<displayName>
<key>CIR Per 250Mbps CoS D</key>
</displayName>
<type entityName="bmiasia.app.siulib.siu.AdditionalServiceSIU"></type>
<mapping entityName="bmiasia.app.service.oo.ServiceAndAdditionalService"></mapping>
<scope>SERVICE</scope>
<outSvcAttr>true</outSvcAttr>
</siu>
<defaultWorkflowInfo>
<workflow entityName="bmiasia.app.irb.servicetemplate12_Workflow"></workflow>
<cancelFlow entityName="bmiasia.app.irb.servicetemplate12_CancelFlow"></cancelFlow>
</defaultWorkflowInfo>
<source>EXTERNAL</source>
<additionalServices entityName="bmiasia.app.irb.servicetemplate54">
<operation>ADD</operation>
<name>CIR Per 250Mbps CoS A</name>
</additionalServices>
<additionalServices entityName="bmiasia.app.irb.servicetemplate55">
<operation>ADD</operation>
<name>CIR Per 250Mbps CoS B</name>
</additionalServices>
<additionalServices entityName="bmiasia.app.irb.servicetemplate56">
<operation>ADD</operation>
<name>CIR Per 250Mbps CoS C</name>
</additionalServices>
<additionalServices entityName="bmiasia.app.irb.servicetemplate57">
<operation>ADD</operation>
<name>CIR Per 250Mbps CoS D</name>
</additionalServices>
<defaultWorkflowDefinition>
<installSoEntityName>bmiasia.app.template.serviceorder.Installservicetemplate12SO</installSoEntityName>
<changeSoEntityName>bmiasia.app.template.serviceorder.Modifyservicetemplate12SO</changeSoEntityName>
<removeSoEntityName>bmiasia.app.template.serviceorder.Removeservicetemplate12SO</removeSoEntityName>
<workflow>
<entityName>bmiasia.app.irb.servicetemplate12_Workflow</entityName>
</workflow>
<cancelFlow>
<entityName>bmiasia.app.irb.servicetemplate12_CancelFlow</entityName>
</cancelFlow>
</defaultWorkflowDefinition>
</ServiceType>Hi !!
Now when iam extracting the data for the above xml, using the below query
SELECT extractvalue(VALUE(p),'/itemkey/*') Name, extractvalue(VALUE(p),'/required/*') Required FROM CL_DATA_SERVICE_TEMPLATE w, TABLE(XMLSEQUENCE(EXTRACT(xmldata,'/ServiceType/siu','xmlns="http://www.bmiasia.com/tBos/service_1_0"'))) p
I am expecting the output to be something like below
Name | Required
L2_OPTION | true
L3_OPTION | false
but iam getting the required number of rows but all blank
Lets take it as O/P should be 20 Rows, then iam getting 20 Rows.... But all are blank
What is wrong in the query ?
Can some one point it out -
How can I import a XML file into pdf doc and how can I retrieve its data as string, in order to populate a drop down List, without using XML Schema Data Connection.
Thank you for your time!First of all you cannot load an XML file in Designer without Reader Extensions, either using xfa.host.importData or any or the import methods in AcroForm javascript. Also, since the XML objects where not available in 6, you cannot parse an XML file in anything other than version 7 of Reader/Acrobat.
So, if you do have Reader 7 (Reader-Enabled) or Acrobat 7, you could use the Attachment object to load the XML file and in turn use the XML object to parse and extract the XML data.
For example, placing the following code on a button will prompt the user to select an XML data file and manually parse it for data.
if (app.viewerVersion >= 7)
event.target.importDataObject("XMLData");
var oData = event.target.getDataObjectContents("XMLData");
var sData = util.stringFromStream(oData);
var oXML = XMLData.parse(sData, true);
event.target.removeDataObject("XMLData");
// Populate Fields
TextField3.rawValue = oXML.MyField1.value;
TextField4.rawValue = oXML.MyField3.value;
TextField1.rawValue = oXML.MyField2.value;
else {
app.alert("Acrobat 7.0 or later is required");
My external XML file is:
<?xml version="1.0" encoding="UTF-8"?>
<MyProperties>
<MyField1>A</MyField1>
<MyField2>B</MyField2>
<MyField3>C</MyField3>
</MyProperties>
Once the data is parsed, you can access it through the same hierarchy as Designer. It actually generates an XFAObject to represent each data node within the XML Document.
The other thing to note is that you cannot load data automatically from an init or calc event. You MUST have some user interaction (i.e. on the click event of a button) -
Retrieve data from xml attributes
Hi
I used oracle xml function to query the database and return the following xml data.
<Item item1="1000" item2="A" item3="B" />Now i would like to extract the value of item1 attribute from the above xml data. I am not sure how to retrieve the attribute data directly from this root element "Item". Any suggestion is highly appreciated.I resolved it myself .
Thanks. -
To retrieve data from xml datatype
oracle.sql.OPAQUE@4e1a77
This is the XML data that is stored in the field of oracle XML dataype .So from this oracle.sql.OPAQUE@4e1a77 ..how can i retrieve the actual dataDO NOT duplicate your questions.
Locking this thread -
Retrieving data from TCP/IP in xml and displaying values?
Hey, I am using a program to retrieve data from a machine and outputting it in xml to the localhost. On a seperate computer, I am trying to create a client application to read the xml data from that IP host and just output the important values instead of the whole script. I am new to Labview and programming, has anyone written a program similar to what I am trying to accomplish? I searched for it but couldn't quite find what I was looking for. I really could use some help with trying to figure this out and appreciate any help or advice you could give me.
Where did you search? There are examples that ship with LabVIEW that show you how to do client-server applications using TCP/IP. Did you try those? You would need to add the parsing of the data you receive (i.e., the XML).
-
Retrieve data from BW with an XML interface
Hello all,
Is it possible to retrieve data from BW with an XML interface ? And if so, how can we do this ?
Kind regards,
MarcThanks Edan,
Can you please example as how to access the ODS object in the BW using ABAP? Please note that we would initiate the call from another XAPP system and update the data into the CRM system.
Also please provide an example as how the BAPI can acces the cube data in BW.
I assume that we will be writing both the BAPI and the ABAP code( as an RFC) in the BW sysyem and call those from the XAPPS to get data out of BW Cube and ODS respectively.
Thanks
Arunava -
How to retrieve data from catsdb table and convert into xml using BAPI
How to retrieve data from catsdb table and convert into xml using BAPI
Points will be rewarded,
Thank you,
Regards,
Jagrut BharatKumar ShuklaHi,
This is not your requirment but u can try this :
CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
GRANT READ ON DIRECTORY text_file TO fah;
GRANT WRITE ON DIRECTORY text_file TO fah;
DROP TABLE load_a;
CREATE TABLE load_a
(a1 varchar2(20),
a2 varchar2(200))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY text_file
ACCESS PARAMETERS
(FIELDS TERMINATED BY ','
LOCATION ('data.txt')
select * from load_a;
CREATE TABLE A AS select * from load_a;
SELECT * FROM A
Regards
Faheem Latif -
Retrieve data from a dynamic page via loadURL
Hello.
I would like to ask you how it is possible to retrieve data
from a dynamic page (asp classic in my case) using the loadURL
method.
I would like to create an html authentication form (with
username and password fields). The loadURL method should call an
asp page and then pass to the usual function 'DoIfSucceded' the
results of the elaboration.
Of course I'm going to have a switch in the function in order
to make different actions depending from the results of the asp
page (authentication succeded or failed).
I had a look to the examples at this page:
Adobe
samples
Is there anyone who can explain clearly how the results data
must be written by the asp page and how the success function can
retrieve them ?
I thank you in advance for your help.loadURL() uses the the XMLHttpRequest Object so if the
content you return is XML, you have 2 choices for accessing your
data. You can either access it as a text string via the
XMLHttpRequest object's responseText property, or as a DOM document
via the XMLHttpRequest object's responseXML property:
function MySuccessCallback(req)
// If my data is XML, I can access the data that was sent
from the server
// as DOM elements via the XMLHttpRequest's responseXML
property.
var xmlDOM = req.xhRequest.responseXML;
// OR, you can access the data sent back from the server as
text via
// the XMLHttpRequest object's responseText property.
var xmlAsAString = req.xhRequest.responseText;
var req = Spry.Utils.loadURL("GET",
"/app/book.php?id=1&code=54321", true, MySuccessCallback);
If your serverside script wants to use some other format as a
response like JSON or plain text, then you can only access the data
as text via the responseText property.
--== Kin ==-- -
Retrieve data from a non-peoplesoft application using HTTP Get
I need to retrieve data from a non-peoplesoft application. They want us to submit a HTTP GET request to their URL with a series of parameters. I am thinking about using HTTP Targert connector to accomplish this. Does anyone have sample peoplecode?
Currently we are on 8.51.10 Tools...
If there is any better way .. please let me know ..I have used HTTP Get to get XML file from a government sanction list by hitting URL http://www.treasury.gov/ofac/downloads/sdn.xml
There is a delivered PS program that does that for vendor sanctions. I had to get the online setup correctly by creating a new custom Node with HTTP Target Connector. The program name is BSP_IMPORT. The below code is responsible for the calling the node and retrieving the data. Play around with the code below see if you can get it to meet your needs.
BSP_IMPORT_AET.BANKNODE.Value is just the custom external code that I created.
PMT_FLAT_FILE_INBOUND message is just a none rowset based message to use the web service call.
Local TR:FileUtilities:FTP &oFTPUtil = create TR:FileUtilities:FTP();
+/* HTTP */+
+/*******************************************************************************/+
Local Message &msgHTTP;
Local Message &msgResult;
+&msgHTTP = CreateMessage(Message.PMT_FLAT_FILE_INBOUND);+
+&oFTPUtil.PopulateFTPGetIBInfo(&msgHTTP, BSP_IMPORT_AET.BANKNODE.Value);+
+&msgResult = %IntBroker.ConnectorRequest(&msgHTTP);+
+/* check to see if the file is wrapped */+
+&strAllLines = &msgResult.GenXMLString();+
+&strAllLines = Substitute(&strAllLines, Char(26), " "); /* Added this line to remove invalid characters */+
+/*******************************************************************************/+
Edited by: Maher on Mar 20, 2012 3:28 PM -
How to retrieve data from a web service
Hi
i am at very beginner level about web services.
I am searching for a simple example of retrieving data from a web services, but cant find.
How can i get xml data from a web service. i dont need to develop the web service it is already ready, i just need how could i fetch data from it.
Can somebody point out or give an example?
Thanks in advanceHi,
just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
Frank -
Problem retrieving Data from a CDATA-Section using XMLDOM
Hello,
Ware: Oracle 8.1.7.4 64bit, XDK for PL/SQL Version 9.2.0.3, Solaris8 64bit
I can't retrieve Data from the CDATA-Section of an XML-String, neither with
getData(DOMCharacterData) or substringData. Also getLength fails. I get always
the following error:
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.ClassCastException
ORA-06512: at "XML_SCHEMA.XMLCHARDATACOVER", line 0
ORA-06512: at "XML_SCHEMA.XMLDOM", line 853
ORA-06512: at "SCHWABE.XML_TEST", line 47
ORA-06512: at line 1
I can successfully cast the DOMNode to a CharacterData with makeCharacterData
and check with isNull (DOMCharacterData) (returns FALSE).
My Testcase:
1) A Function which build a XML-Document:
CREATE OR REPLACE FUNCTION XML_ResponseCalc RETURN VARCHAR2 IS
doc VARCHAR2(32767);
BEGIN
doc :=
'<?xml version="1.0" encoding="UTF-8"?>
<RSDecEng>
<Version>1.00</Version>
<ResponseCalc>
<ID>00000000000000000014</ID>
<Burst>
<Definition>
<Count>1</Count>
<ID>
<Start>1</Start>
<Length>4</Length>
</ID>
<Var>
<Name>Risiko_1</Name>
<Start>5</Start>
<Length>5</Length>
</Var>
</Definition>
<Data>
<Length>9</Length>
<Count>5</Count>
<![CDATA[
1 0.001
2 0.002
3 0.003
4 0.004
5 0.005
6 0.006
7 0.007
8 0.008
9 0.009
10 0.010
]]>
</Data>
</Burst>
</ResponseCalc>
</RSDecEng>
2) The Procedure which parses the XML-Document (no Exception-Handling):
CREATE OR REPLACE PROCEDURE XML_TEST IS
Parser XML_SCHEMA.XMLParser.Parser;
DOMDocument XML_SCHEMA.XMLDOM.DOMDocument;
DOMNode XML_SCHEMA.XMLDOM.DOMNode;
DOMNodeItem XML_SCHEMA.XMLDOM.DOMNode;
DOMNodeList XML_SCHEMA.XMLDOM.DOMNodeList;
DOMCharacterData XML_SCHEMA.XMLDOM.DOMCharacterData;
TheDocument CLOB;
ID VARCHAR2(100);
Data VARCHAR2(200);
BEGIN
-- LOB
DBMS_LOB.CREATETEMPORARY(TheDocument, TRUE);
DBMS_LOB.WRITEAPPEND(TheDocument, LENGTH(XML_ResponseCalc), XML_ResponseCalc);
-- Parse
Parser := XML_SCHEMA.XMLParser.NewParser;
XML_SCHEMA.XMLParser.ParseCLOB(Parser, TheDocument);
DOMDocument := XML_SCHEMA.XMLParser.GetDocument(Parser);
XML_SCHEMA.XMLParser.FreeParser(Parser);
-- Node
DOMNode := XML_SCHEMA.XMLDOM.MakeNode(DOMDocument);
-- Get ID
DOMNodeList := XML_SCHEMA.XSLProcessor.SelectNodes
(DOMNode,'/RSDecEng/ResponseCalc/ID/text()');
IF XML_SCHEMA.XMLDOM.GetLength(DOMNodeList) > 0 THEN
DOMNodeItem := XML_SCHEMA.XMLDOM.Item(DOMNodeList, 0);
XML_SCHEMA.XMLDOM.WriteToBuffer(DOMNodeItem, ID);
SYS.DBMS_OUTPUT.PUT_LINE ('ID: '||ID);
END IF;
-- Get CDATA
DOMCharacterData := XML_SCHEMA.XMLDOM.MakeCharacterData(DomNode); -- <-- ok here...
IF NOT XML_SCHEMA.XMLDOM.isNull (DOMCharacterData) THEN -- <-- ...and here
Data := XML_SCHEMA.XMLDOM.GETDATA(DOMCharacterData); -- <-- ...but here Exception raise
END IF;
END;
I hope you can help me.
Thank you in advance
Markus SchwabeYou need to notice the definitions for makecharacterdata:
FUNCTION makeCharacterData(n DOMNode) RETURN DOMCharacterData;
PURPOSE
Casts given DOMNode to a DOMCharacterData
It only do the casting.
Maybe you are looking for
-
I can't connect my seagate external hard drive since I updated to yosemite. Im getting error code 71, can someone help me?
-
Run time error iview 'Leave Overview' in ESS - Pl Help
Hi Gurus , We are getting run time error when we click the 'Leave Overview' in ESS. when emloyee applies for leave he may need to wait for aproval during that time he cannot access the 'leave overview' screen he will be facing run time error . becaus
-
1 set of speakers, Airport Express & TV
I have a set of Bose computer speakers connected to my TV via the audio out jack on the TV. I would like to have the option of also playing music through these speakers via Airplay, by connecting them to an Airport Express unit. Is there a way to mak
-
I am running out on space on my MacBook Pro. When I check my iTunes library it states 90.18 GB used but when I go into "About this Mac" under storage I see the audio space used is 124 GB. That's quite a difference - 34 GB. Does anyone know why the di
-
Revision: 8024 Author: [email protected] Date: 2009-06-19 16:59:25 -0700 (Fri, 19 Jun 2009) Log Message: Fixed an injection where setting the 'content' property of Spark text component to a TextFlow would cause you to get a TextFlow nested insi