XML Busrtig query
Dear Techies,
In payable module when payments made to suppliers I need to send an email notification to that particular supplier. I have achieved this by using xml bursting. Every thing is fine but
I have got an another change request from my client which is depends upon Payment method (Check, Wire or Cash ) they want one image to be in email body. (Image contains some text in different colors and different fonts)
I am wondering how can i do this ?
below is my control file code. Please let me know how can i mention image path , so that it will take from there and sends an email.
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
<xapi:globalData location="stream" />
<xapi:request select="/XX_PAYEMAIL_NEW1/LIST_G_1/G_1">
<xapi:delivery>
<xapi:email server="10.250.90.31" port="25" from="[email protected]" reply-to="[email protected]">
<xapi:message id="123" to="${EMAIL_ADDRESS}" cc="[email protected]" bcc="[email protected]" attachment="true" content-type="html/text" subject="${SUBJECT} ${CHECK_NUMBER}">Please find attached payment details report. ${CHECK_NUMBER}_${VENDOR_NAME} </xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document key="${CHECK_NUMBER}" output="/oracleas42/app/haadpprd/apps/apps_st/appl/xxhaad/12.0.0/out/${CHECK_NUMBER}_${VENDOR_NAME}.pdf" output-type="pdf" delivery="123">
<xapi:template type="rtf" location="/oracleas42/app/haadpprd/apps/apps_st/appl/xxhaad/12.0.0/out/XX_PAYEMAIL_RTF.rtf" />
</xapi:document>
</xapi:request>
</xapi:requestset>
Thanks in advance guys :)
bump
Similar Messages
-
Logical operation in xml path query
Hello
If I have this XML data
<a>
<b>
<c>
<d>United States</d>
<f>1</f>
<g>Creditcard</g>
<h>Will ship only within country</h>
<k>something</k>
</c>
<c>
<d>United States</d>
<f>2</f>
<g>MasterCard</g>
<h>international</h>
<k>something</k>
</c>
<c>
<d>United States</d>
<f>2</f>
<g>MasterCard</g>
<h>international</h>
<k>something</k>
</c>
<c>
<d>United States</d>
<f>2</f>
<g>MasterCard</g>
<h>international</h>
<k>something</k>
</c>
<c>
<d>United States</d>
<f>2</f>
<g>MasterCard</g>
<h>international</h>
<k>something</k>
</c>
</b>
</a>
and I have this query:
Q1: //c[NOT [[[/d="United States" AND /f="1" AND /g="Creditcard"] OR h="Will ship only within country"]]]
How to write xml/sql query for it to retrive THE COUNT of the result , count of "c"
Q2: //c[NOT [[[/d="United States" AND /f="1" AND /g="Creditcard"] OR h="Will ship only within country"]]]/k
How to write xml/sql query for it to retrive THE COUNT of the result , count of "c/k"
Thank youFor example :
SQL> with sample_data as (
2 select xmltype('<a>
3 <b>
4 <c>
5 <d>United States</d>
6 <f>1</f>
7 <g>Creditcard</g>
8 <h>Will ship only within country</h>
9 <k>something</k>
10 </c>
11 <c>
12 <d>United States</d>
13 <f>2</f>
14 <g>MasterCard</g>
15 <h>international</h>
16 <k>something</k>
17 </c>
18 <c>
19 <d>United States</d>
20 <f>2</f>
21 <g>MasterCard</g>
22 <h>international</h>
23 <k>something</k>
24 </c>
25 <c>
26 <d>United States</d>
27 <f>2</f>
28 <g>MasterCard</g>
29 <h>international</h>
30 <k>something</k>
31 </c>
32 <c>
33 <d>United States</d>
34 <f>2</f>
35 <g>MasterCard</g>
36 <h>international</h>
37 <k>something</k>
38 </c>
39 </b>
40 </a>') xmldoc
41 from dual
42 )
43 select count(*)
44 from sample_data
45 , xmltable(
46 '//c[not(((d="United States" and f="1" and g="Creditcard") or h="Will ship only within country"))]'
47 passing xmldoc
48 ) x ;
COUNT(*)
4 -
Hi,
This is My problem:
I receive datas from an xml Feed and I always worked in this
way:
<cftry>
<!--- fetch data from web service --->
<cfhttp url="
http://www.............
method="get" charset="utf-8"/>
<cfset xmldata = cfhttp.fileContent>
<cftry>
<!--- extract data from XML document and convert to query
--->
<cfset lstColumns =
"KH,NH,KC,NC,KD,ND,KS,NS,KL,NL,KZ,NZ,LR"/>
<cfset q2 = queryNew(lstColumns)/>
<!--- <cfif isXml(cfhttp.fileContent)> avialable in
CF7 only --->
<cfset xmlObject = xmlParse(xmldata)/>
<cfloop index="i" from="1"
to="#arrayLen(xmlObject["ArrayOfHotelRoom"].xmlChildren)#">
<cfset queryAddRow(q2,1)/>
<cfloop index="ii" list="#lstColumns#">
<cfset
querySetCell(q2,ii,xmlObject["ArrayOfHotelRoom"].xmlChildren
[ii].xmlText)/>
</cfloop>
</cfloop>
<!--- </cfif> --->
<cfcatch type="any"> <!--- any errors return empty
result set --->
<cfset q2 = queryNew(lstColumns)/>
</cfcatch>
</cftry>
<cfcatch type="any">
<cfoutput>There has been an internal problem. Please
try again later</cfoutput>
<cfexit>
</cfcatch>
</cftry>
<!--- use QoQ to filter by hotel name --->
<cfquery name="q" dbtype="query">
select * from q2
where SH = 'A' <!--- only show available hotels --->
</cfquery>
NOW THE PROBLEM IS THAT I NEED NOW TO IMPROVE MY SYSTEM USING
A NEW VERSION OF THE XML CATALOGUE THAT NOW INCLUDE XML.CHILDREN:
THE NEW XML:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfHotelRoom xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns="
http://tempuri.org/xml/xmlService">
<HotelRoom>
<KH>717</KH>
<NH>Acanto Suites & Lounge</NH>
<KC>PDC</KC>
<NC>Playa del Carmen</NC>
<KD>16</KD>
<ND>Playa del Carmen</ND>
<KS>7E</KS>
<NS>Special Category</NS>
<KL>CENT</KL>
<NL>City</NL>
<KZ>1</KZ>
<NZ>The Yucatan Peninsula</NZ>
<LR>132.5000</LR>
<Rooms>
<RoomType>
<KR>VLLBR1</KR>
<NR>One Bedroom Villa</NR>
<MP>RO</MP>
<RR>132.5</RR>
<IP>0</IP>
<IL>0</IL>
<IN>0</IN>
<IF>0</IF>
<PH>0</PH>
<SH>A</SH>
</RoomType>
</Rooms>
</HotelRoom>
AS YOU SEE AFTER "LR" NOW I FIND OTHERS CHILDREN AND I DO
NOT HOW TO REDUCE MY NEW XML TO QUERY
Thank You
AndreaHi Charlie,
thanks for your fast answer. I try to figure out what's are
my doubts and need:
1) Yes it must to be a query because i need to filter data to
be shown in many different outputs.
2) I understand that it should be possible to create
something like 2 database table :
one for the Hotel and
one for Rooms with all the subitems( I confirm you that there
will be situations with more RoomType Item for each Rooms. My doubt
now is how I will be able to manage the query joining the 2 tables
when I miss a common date to show in the statement WHERE ( Example
: WHERE Hoteltable.#KH#( hotel ID ) = RoomsTable.#Here I will miss
the compare data that in the second table is not provided by the
xml#.
How will I be able to manage the query??????
I think this is our way but I am really lost at this level.
Of course the solutions with only one table with multiple
rows for each rooms type will create me problems in outputs results
. I will have results where the selection will not be the hotel but
the rooms type and will be inconvenient to receive dinamically 5
times the same hotel with the different rooms type details.
What I need is to receive each hotel only once with all the
roomstype details inside.
Thanks for your help
Andrea -
Oracle XSU: oracle.xml.sql.query.OracleXMLQuery is not recognized
Hi, there!
I've got a problem when tryed to use Oracle XSU (xml-sql utility to generate xml). My simple java application works fine using XSU. But when I created session stateless bean I've got an EJBException regarding this
line:
oracle.xml.sql.query.OracleXMLQuery qry = new oracle.xml.sql.query.OracleXMLQuery(conn, commandSQLStatement);
It doesn't recognize OracleXMLQuery class as I've got in dump. So my classpath includes original location of that utility and Oracle parser.
I really appreciate for any help.
Thanks.
strXML = qry.getXMLString();Patricia,
Did you go through the link
Re: XML SQL Utility
You have to put xsu12.jar in the lib directory of the jdev.
xsu12.jar is in the lib directory of the XDK installation.
You can download XDK from
http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
-- Arvind -
Oracle.xml.sql.query.OracleXMLQuery GetXML -withDTD
I'm trying to create a dtd for each table in my schema. I've created a java program that loops through the user_tables and I am then trying to create the DTD with oracle.xml.sql.query.OracleXMLQuery -withDTD. I am able to make it work using the XSU Command Line Utility, but I'm having a hard time trying to find out where the -withDTD flag goes inside my java program. Anyone know how to use the -withDTD option inside of a java program?
Thanks[from XmlRpc-Java]
As a result, my XML
is contained in a String instead of an InputStream.
It is possible to convert a String to an InputStream using
StringBufferInputStream, but this class is deprecated in favor of
StringReader (as StringBufferInputStream does not properly convert
characters into bytes).
For the default HTTP transport, an InputStreamReader could be used to
wrap the InputStream before calling parse().
Ultimately, the InputStream is converted to an InputSource for use by
the SAX parser. InputSource will accept a Reader as well.
[from XmlRpc-Java]
There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
null -
Oracle.xml.sql.query.OracleXMLQuery not found
Hi!
Sorry, but I got a project to continue and there is an import statement "import oracle.xml.sql.query.OracleXMLQuery;" and this gives me a compilation error...
What do I need to do, where do I find this class??? Any help?
//PatriciaPatricia,
Did you go through the link
Re: XML SQL Utility
You have to put xsu12.jar in the lib directory of the jdev.
xsu12.jar is in the lib directory of the XDK installation.
You can download XDK from
http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
-- Arvind -
Oracle.xml.sql.query.OracleXMLQuery?
Anyone know where I can find a java doc or any method infomation on:
oracle.xml.sql.query.OracleXMLQuery
thanks,
chad.[from XmlRpc-Java]
As a result, my XML
is contained in a String instead of an InputStream.
It is possible to convert a String to an InputStream using
StringBufferInputStream, but this class is deprecated in favor of
StringReader (as StringBufferInputStream does not properly convert
characters into bytes).
For the default HTTP transport, an InputStreamReader could be used to
wrap the InputStream before calling parse().
Ultimately, the InputStream is converted to an InputSource for use by
the SAX parser. InputSource will accept a Reader as well.
[from XmlRpc-Java]
There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
null -
ORA-29540: class oracle/xml/sql/query/OracleXMLStaticQuery does not exist
I am getting below error when trying to generate xml. Browsing on google did not help me. I would appreciate if someone can provide the solution.
SQL> select dbms_xmlquery.getxml('select * from dual', 2) from dual;
ERROR:
ORA-29540: class oracle/xml/sql/query/OracleXMLStaticQuery does not exist
ORA-06512: at "SYS.DBMS_XMLQUERY", line 19
ORA-06512: at "SYS.DBMS_XMLQUERY", line 271
ORA-06512: at line 1Then it is probably not the case that you are affected by the issue described in Metalink document 185857.1, but if I were you I would check it anyway, since it might be the problem.
-
Where is the oracle.xml.sql.query package?
Hi,
I have downloaded the xmlparser_v2_0_2_9.zip. I hoped I have everything to compile the example for retrieving XML document with an sql query. However, the jar file is missing the entire package oracle.xml.sql.query which contains for instance the crucial class OracleXMLQuery. Does anyone know where I could get this package - is it part of another download that I have to do, or can I buy it anywhere? Thanks for your help.
KarelIt's part of the XML SQL Utility for Java, avialable for download from http://technet.oracle.com/tech/xml
-
Hello, all.
I get this error message:
java.lang.NoClassDefFoundError: oracle/xml/sql/query/OracleXMLQuery
at oracle.xml.xsql.actions.XSQLQueryHandler.handleAction(Compiled Code) ...
when trying to view an xsql page with the jswdk 1.0.1 web server. (I have no problems when using Web-to-go)
Classpath includes:
C:\jdk1.1.8\lib\classes.zip;
C:\xsql\lib\oraclexsql.jar;
C:\xsql\lib\xmlparserv2.jar;
C:\xsql\lib\xsu111.jar;
C:\xsql\lib\classes111.zip;
C:\xsql\lib;
What could be the problem?
Mateja
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
Only thing I can think of is that maybe your server classpath is getting too long. I recall one of the Java Web Server releases having a classpath length limit that caused strange errors like this because that .jar files you thought were on your classpath were getting their path names truncated so the Java VM cannot find the JAR's.
Try putting xsu111.jar earlier in the list of JAR's and/or try shortening the classpath (perhaps by using SUBST'd drive letters or softlinks on Unix to shorten the path names).<HR></BLOCKQUOTE>
Putting the xsu11.jar file towards the start of the path did not help.
I have rewriten the entire bat file that creates the CLASSPATH and starts the server and things now seem to work. There must have been some error in the original bat file, that I just couldn't see.
Anyway - I thank you for your help.
null -
Problem in importing oracle.xml.sql.query.*
When i am importing this
import oracle.xml.sql.query.*;
it is giving me error that
"package oracle.xml.sql.query.* does not exist".
What Should i install or set .[from XmlRpc-Java]
As a result, my XML
is contained in a String instead of an InputStream.
It is possible to convert a String to an InputStream using
StringBufferInputStream, but this class is deprecated in favor of
StringReader (as StringBufferInputStream does not properly convert
characters into bytes).
For the default HTTP transport, an InputStreamReader could be used to
wrap the InputStream before calling parse().
Ultimately, the InputStream is converted to an InputSource for use by
the SAX parser. InputSource will accept a Reader as well.
[from XmlRpc-Java]
There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
null -
Error in oracle.xml.sql.query
I am trying to write small piece of code as
follows
import java.sql.*;
import java.math.*;
import oracle.xml.sql.query.*;
import oracle.jdbc.*;
import oracle.jdbc.driver.*;
Actual Code
When i try to compile
the java file it errors out on Package Oracle.xml.sql.query not found in import
Pacakage oracle.jdbc.* not found
Package oracle.jdbc.driver not found
Is there any files to be installed.
I installed default Enterprise edition of Oracle 8.1.7 on NT
Please advise
Thanks,
Vidhya
nullHave you include classes12.jar/zip, xsu12.jar in your classpath?(assume using JDK 1.2.x)
-
Import oracle.xml.sql.query
what file do I need to use this class?
Thanks.oracle.xml.sql.query is a package.
Please refer
http://www.devx.com/xml/Article/32046 -
Class oracle.xml.sql.query.OracleXMLQuery not found in import
I tried to perform load java using a non-sys user :
loadjava -user user1/passwd -v -o -r Archive.java
but encountered the following error:
Errors in Archive:
ORA-29535: source requires recompilation
Archive:11: Class oracle.xml.sql.query.OracleXMLQuery not found in import.
Info: 1 errors
loadjava: 3 errors
But if I use sys user I don't have any error:
loadjava -user sys/manager -v -o -r Arachive.java
initialization complete
loading : Archive
creating : Archive
resolver :
resolving: Archive
Why is this so?
ANy security setup that I missed?
Thanks in advance.
Note:
my Archive.java file contains:
// Core Java Classes
import java.io.*;
import java.sql.*;
// Oracle Java classes
import oracle.jdbc.*;
import oracle.jdbc.driver.*;
import oracle.xml.sql.query.OracleXMLQuery;
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Azman Diron ([email protected]):
I tried to perform load java using a non-sys user :
loadjava -user user1/passwd -v -o -r Archive.java
but encountered the following error:
Errors in Archive:
ORA-29535: source requires recompilation
Archive:11: Class oracle.xml.sql.query.OracleXMLQuery not found in import.
Info: 1 errors
loadjava: 3 errors
But if I use sys user I don't have any error:
loadjava -user sys/manager -v -o -r Arachive.java
initialization complete
loading : Archive
creating : Archive
resolver :
resolving: Archive
Why is this so?
ANy security setup that I missed?
Thanks in advance.
Note:
my Archive.java file contains:
// Core Java Classes
import java.io.*;
import java.sql.*;
// Oracle Java classes
import oracle.jdbc.*;
import oracle.jdbc.driver.*;
import oracle.xml.sql.query.OracleXMLQuery;
<HR></BLOCKQUOTE>
Managed to solve this problem.
Drop all xml objects owned by sys and user1.
Reload xml objcets for user1 with -force option.
null -
Hi all,
From https://www.simple-talk.com/content/print.aspx?article=1756, I mimicked to create the following sql code to do Importing XML data using a CTE:
---Importing XML data using a CTE -----Ad-Hoc XML File Query--simple-talk---1020AM 27 Feb 2015
---query the XML Blob using a CTE (pulling from the XML file each time
USE OPENXMLtesting1
GO
With XmlFile (Contents) AS (
SELECT CONVERT (XML, BulkColumn)
FROM OPENROWSET (BULK 'C:\XML FilesMicrosoft-Samples\books.xml', SINGLE BLOB) AS XmlData
SELECT
FROM XmlFile
GO
I got the following message:
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'BLOB'.
I have no ideas why it is incorrect in that code statment. Please kindly help, advise and respond.
Thanks in advance,
Scott Chang
P. S. The books.xml file was copied from the Microsoft samples:
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies,
an evil sorceress, and her own childhood to become queen
of the world.</description>
</book>
<book id="bk103">
<author>Corets, Eva</author>
<title>Maeve Ascendant</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-11-17</publish_date>
<description>After the collapse of a nanotechnology
society in England, the young survivors lay the
foundation for a new society.</description>
</book>
<book id="bk104">
<author>Corets, Eva</author>
<title>Oberon's Legacy</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-03-10</publish_date>
<description>In post-apocalypse England, the mysterious
agent known only as Oberon helps to create a new life
for the inhabitants of London. Sequel to Maeve
Ascendant.</description>
</book>
<book id="bk105">
<author>Corets, Eva</author>
<title>The Sundered Grail</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-09-10</publish_date>
<description>The two daughters of Maeve, half-sisters,
battle one another for control of England. Sequel to
Oberon's Legacy.</description>
</book>
<book id="bk106">
<author>Randall, Cynthia</author>
<title>Lover Birds</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-09-02</publish_date>
<description>When Carla meets Paul at an ornithology
conference, tempers fly as feathers get ruffled.</description>
</book>
<book id="bk107">
<author>Thurman, Paula</author>
<title>Splish Splash</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-11-02</publish_date>
<description>A deep sea diver finds true love twenty
thousand leagues beneath the sea.</description>
</book>
<book id="bk108">
<author>Knorr, Stefan</author>
<title>Creepy Crawlies</title>
<genre>Horror</genre>
<price>4.95</price>
<publish_date>2000-12-06</publish_date>
<description>An anthology of horror stories about roaches,
centipedes, scorpions and other insects.</description>
</book>
<book id="bk109">
<author>Kress, Peter</author>
<title>Paradox Lost</title>
<genre>Science Fiction</genre>
<price>6.95</price>
<publish_date>2000-11-02</publish_date>
<description>After an inadvertant trip through a Heisenberg
Uncertainty Device, James Salway discovers the problems
of being quantum.</description>
</book>
<book id="bk110">
<author>O'Brien, Tim</author>
<title>Microsoft .NET: The Programming Bible</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-09</publish_date>
<description>Microsoft's .NET initiative is explored in
detail in this deep programmer's reference.</description>
</book>
<book id="bk111">
<author>O'Brien, Tim</author>
<title>MSXML3: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-01</publish_date>
<description>The Microsoft MSXML3 parser is covered in
detail, with attention to XML DOM interfaces, XSLT processing,
SAX and more.</description>
</book>
<book id="bk112">
<author>Galos, Mike</author>
<title>Visual Studio 7: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>49.95</price>
<publish_date>2001-04-16</publish_date>
<description>Microsoft Visual Studio 7 is explored in depth,
looking at how Visual Basic, Visual C++, C#, and ASP+ are
integrated into a comprehensive development
environment.</description>
</book>
</catalog>I found the mistakes I made and I corrected them. The newly revised/corrected code is:
USE OPENXMLtesting1
GO
With XmlFile (Contents) AS (
SELECT CONVERT (XML, BulkColumn)
FROM OPENROWSET (BULK 'C:\Temp\books.xml', SINGLE_BLOB) AS XmlData
SELECT *
FROM XmlFile
GO
It worked: Results
Contents
1 <catalog><book.id="bk101"><author>Gambardella.M...
If I clicked on this, I got a listing of the whole book.xml!! I don't know what it means. Please comment and respond.
Thanks,
Scott Chang
Maybe you are looking for
-
Hi, I had developed a project in visual studio c# and my database in SQL server. How can i create a executable file including both. can any one give me a solution for this. I am trying to make executable in installshield. Thank you
-
CAN HP Envy 15t j100 Support 2 external monitors?
Hi, I'm trying to figure out how to connect 2 external Dell monitors with HDMI inputs, to my Envy 15t j100. The evy has only 1 HDMI out port. The Envy also has 4 USB 3.0 ports. Ideally, I would like the option to use all 3 displays (The Envy's and t
-
I'm having trouble setting up an Anchor Controller on my DMZ. I have setup everything up and tested it out on my inside network and the Anchor Controller comes up with no problem. When I put the Anchor Controller on the DMZ the data path is up but th
-
Programmatically setting SQL Query string?
Post Author: JoeM CA Forum: Data Connectivity and SQL Hi, I recently updated to Crystal Reports 11 from 8.5 and am having some problems getting my reports to properly function. I need to set the SQL query string in the report at runtime in our C++ b
-
Hi, When I am trying to change the Query (Global definition) then it's showing an error "A Dependent object is being locked by Transport System. Whereas there is no entry found as Object locked in the list by transaction RS12 or SM12. Does anybody k