XML, Oracle and Namespaces
Do any of the current XML parsers support namespaces?
If not how can the idea of external DTD or schema be used
Will Oracle be supporting schemas
null
martin Roberts (guest) wrote:
: Do any of the current XML parsers support namespaces?
: If not how can the idea of external DTD or schema be used
: Will Oracle be supporting schemas
Our current parsers support namespaces and will support schemas
once things settle down in that WG.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null
Similar Messages
-
I´m using XML Publisher 5.5 with Template Builder. I have created an RTF document that works perfect with XML Publisher. I now want work more complicated with my template using XSL. I have through Template Builder created an XSL-FO style sheet.
I open the xsl-doc in XMLSPY, assinging an xml-doc and try to preview expecting the result to be the same as using Template Builder but the layout gets all messed up and I get an error that says that the namespace xmlns:xdofo="http://xmlns.oracle.com/oxp/fo/extensions" is invalid.
The complete start tag:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ora="http://www.oracle.com/XSL/Transform/java/"
xmlns:xdofo="http://xmlns.oracle.com/oxp/fo/extensions"
xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions"
xmlns:xdoxliff="urn:oasis:names:tc:xliff:document:1.1">
Does anybody know where I should point my namespace or what I´m doing wrong?
Regards,
DanielI know what I can do in RTF and maybe it´s enough:
1. Ensure you are using both tabs of the help text, you can start in Status Bar and continue with Help Key.
2. You can also use multiple fields one after another.
3. If you fill all of that and need more space I would consider moving the function out into its own XSL template and register it as a sub template and reference it from your main template. This is especially useful if you are going to need the same function across multiple templates.
My problem was why I can´t use XSL-FO - XML in XMLSPY, have´nt anybody tried to go out of the WORD-RTF and code som XSL? Maybe it´s not possible and I have to use WORD-RTF.
/Daniel -
JSP Documents (JSP pages in XML format) and Namespaces
I have 1 set of XSLT stylesheets that takes XML and outputs JSP documents.
This 1 set of XSLT supports numerous clients (customers).
I have a new customer that uses a new namespace, let's call it "xyz".
This namespace is the TLD for xyz custom tags.
So, it would look something like this in the resulting jsp:root tag --> xmlns:xyz = "/xyzTagLib".
Where /xyzTagLib has a corresponding entry in web.xml that points to the xyz.tld that is delivered in WEB-INF/TLD.
However, most customers do not have the xyz application installed.
Thus, I added the exclude-namespace-prefixes="xyz" in the xsl:stylesheet tag to conditionally add the xmlns:xyz only if an xyz tag exists. However, this does not add it to the jsp:root tag, but only to each individual xyz tag in the resulting document.
However, the resulting JSP does not work in the runtime environment because it does not recognize the xyz tags.
Is there a known bug with jsp documents declaring namespaces "in line" instead of at the jsp:root level? Is there a way around this?
Thanks,
BrianHi Tridib,
the XML content is stored in the .xml file. You'll have to access it in a way that doesn't cause the XML-to-HTML transformation to take a peek at the format. You could probably do this by accessing the repository in question via WebDAV. If you're on a later SP, you should be able to go to /irj/go/km/docs/ in your browser to access the repository via WebDAV. Otherwise, take a look in the details pane of the folder that contains the .xml file in question. Under properties, there'll be a URL to access the folder via WebDAV. -
Xml deserialization and namespace issue.
I have an xml file something like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NS1:NodeA xmlns:NS1="FooSpace">
<NS1:NodeB>
<NS1:NodeC>
<NS1:ElementA>text</NS1:ElementA>
</NS1:NodeC>
<NS1:NodeD>
<Attributes>
<Name>xxx</Name>
<Value>yyy</Value>
</Attributes>
<Attributes>
<Name>www</Name>
<Value>zzz</Value>
</Attributes>
</NS1:NodeD>
</NS1:NodeB>
</NS1:NodeA>
I can parse every thing upto the contents of NodeD. For the classes which expose elements (NodeA to NodeD), I decorate the properties as follows:
[XmlElement("property_name", Namespace = "FooSpace")]
The Attributes class has properties without the Namespace key.
Anyone know what I am missing?
Thanks!I am glad to know you solved this problem and thanks for sharing the solution.
It will be very beneficial for other community members who have the similar questions.
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. -
Issue with parsing an xml document and namespaces
I am having an issue when parsing an xml document that includes a namespace.
Here is my xml:
<?xml version="1.0" encoding="utf-8"?>
<StatusFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" TxCnt="247" TxTotal="5756845.31" SourceId="3" xmlns="http://www.test.com/cig/payments/optimizer/status/2004/10/">
<Tx PmtId="350031" Amt="16739" TxSts="09" CustSts="04" ChkNum="10605770" />
<Tx PmtId="350990" Amt="31698.66" TxSts="09" CustSts="04" ChkNum="10605821" />
<Tx PmtId="354992" Amt="201320.08" TxSts="09" CustSts="04" />
<Tx PmtId="349277" Amt="6675.17" TxSts="09" CustSts="04" ChkNum="10605822" />
<Tx PmtId="354979" Amt="66949.75" TxSts="09" CustSts="04" ChkNum="10605823" />
<Tx PmtId="349341" Amt="63258.49" TxSts="09" CustSts="04" ChkNum="10605824" />
<Tx PmtId="350025" Amt="5866.04" TxSts="09" CustSts="04" ChkNum="10605830" />
<Tx PmtId="350024" Amt="15671.8" TxSts="09" CustSts="04" ChkNum="10605831" />
<Tx PmtId="346822" Amt="9880.64" TxSts="09" CustSts="04" />
<Tx PmtId="350023" Amt="1360" TxSts="09" CustSts="04" />
<Tx PmtId="349802" Amt="131267" TxSts="09" CustSts="04" ChkNum="10605832" />
<Tx PmtId="343573" Amt="14532.76" TxSts="09" CustSts="04" ChkNum="10605833" />
<Tx PmtId="352675" Amt="4436" TxSts="09" CustSts="04" />
<Tx PmtId="350022" Amt="1260" TxSts="09" CustSts="04" ChkNum="10605834" />
<Tx PmtId="349714" Amt="80778" TxSts="09" CustSts="04" ChkNum="10605835" />
<Tx PmtId="352676" Amt="10136" TxSts="09" CustSts="04" ChkNum="10605836" />
<Tx PmtId="352679" Amt="25511.69" TxSts="09" CustSts="04" ChkNum="10605837" />
<Tx PmtId="346502" Amt="12842.69" TxSts="10" CustSts="05" />
<Tx PmtId="346503" Amt="4232.61" TxSts="09" CustSts="04" ChkNum="10605838" />
</StatusFile>
Here is my current code base:
CREATE OR REPLACE PROCEDURE ParseXML(xml VARCHAR2) IS
myParser xmlparser.parser := xmlparser.newparser;
myDoc xmldom.DOMNode;
myNodes xmldom.DOMNodeList;
myElement xmldom.DOMElement;
trec NDE_CIG_STATUS_TRANSACTIONS%ROWTYPE;
BEGIN
xmlparser.parseBuffer(myParser,xml);
myDoc := xmldom.makeNode(xmlparser.getDocument(myParser));
myNodes := xslprocessor.selectNodes(myDoc,'//Tx');
FOR i IN 0..xmldom.getLength(myNodes)-1 LOOP
myElement := xmldom.makeElement(xmldom.item(buyOrders,i));
trec.pmt_id := xmldom.getAttribute(curBuy,'PmtId');
INSERT INTO NDE_CIG_STATUS_TRANSACTIONS(PMT_ID) VALUES (trec.pmt_id);
END LOOP;
COMMIT;
END ParseXML;
If I remove the namespace, everything works just fine. The issue is that I cannot remove the namespace.
Anyone have any suggestions on how I can get the xslprocessor.selectNodes to recognize my namespace?
Thanks,
Mark MoranEveryone,
Well after lots of hours spent reading web pages and blogs, etc... I was able to re-write my procedure and get it to work with different calls.
Here is my updated code.
PROCEDURE PARSE_STATUS_XML(P_FILE_NAME IN VARCHAR2, P_XML_FILE IN CLOB) IS
V_PARSER XMLPARSER.PARSER := XMLPARSER.NEWPARSER;
V_DOCUMENT XMLDOM.DOMDOCUMENT;
V_NODES XMLDOM.DOMNODELIST;
V_ELEMENT XMLDOM.DOMELEMENT;
V_TBL_RECORD NDE_CIG_STATUS_TRANSACTIONS%ROWTYPE;
BEGIN
XMLPARSER.PARSECLOB(V_PARSER, P_XML_FILE);
V_DOCUMENT := XMLPARSER.GETDOCUMENT(V_PARSER);
V_ELEMENT := XMLDOM.GETDOCUMENTELEMENT(V_DOCUMENT);
V_NODES := XMLDOM.GETELEMENTSBYTAGNAME(V_ELEMENT,'Tx','http://www.test.com/cig/payments/optimizer/status/2004/10/');
FOR I IN 0..XMLDOM.GETLENGTH(V_NODES)-1 LOOP
V_ELEMENT := XMLDOM.MAKEELEMENT(XMLDOM.ITEM(V_NODES,I));
V_TBL_RECORD.PMT_ID := XMLDOM.GETATTRIBUTE(V_ELEMENT,'PmtId');
V_TBL_RECORD.PMT_AMT := XMLDOM.GETATTRIBUTE(V_ELEMENT,'Amt');
V_TBL_RECORD.E_STATUS_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'TxSts');
V_TBL_RECORD.E_REASON_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'StsRsn');
V_TBL_RECORD.E_CUSTOMER_STATUS_CODE := XMLDOM.GETATTRIBUTE(V_ELEMENT,'CustSts');
V_TBL_RECORD.UPS_TRACKING_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'UpsTrcNum');
V_TBL_RECORD.FED_REFERENCE_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'FedRefNum');
V_TBL_RECORD.FIDB_TRACKING_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'FIDbtTrcNum');
V_TBL_RECORD.CHECK_NBR := XMLDOM.GETATTRIBUTE(V_ELEMENT,'ChkNum');
INSERT INTO NDE_CIG_STATUS_TRANSACTIONS(
CREATE_DATE,
XML_FILE_NAME,
PMT_ID,
PMT_AMT,
E_STATUS_CODE,
E_REASON_CODE,
E_CUSTOMER_STATUS_CODE,
UPS_TRACKING_NBR,
FED_REFERENCE_NBR,
FIDB_TRACKING_NBR,
CHECK_NBR
VALUES (
SYSDATE,
P_FILE_NAME,
V_TBL_RECORD.PMT_ID,
V_TBL_RECORD.PMT_AMT,
V_TBL_RECORD.E_STATUS_CODE,
V_TBL_RECORD.E_REASON_CODE,
V_TBL_RECORD.E_CUSTOMER_STATUS_CODE,
V_TBL_RECORD.UPS_TRACKING_NBR,
V_TBL_RECORD.FED_REFERENCE_NBR,
V_TBL_RECORD.FIDB_TRACKING_NBR,
V_TBL_RECORD.CHECK_NBR
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END PARSE_STATUS_XML;
Mark -
I am trying to send an XML event to BPM. The XML's root node has a namespace associated
with it (for example, <bea:Employee>) where "bea" is defined as a namespace in
the top of the document. It looks like BPM does not support namespaces in start
nodes or event nodes. Is there any way to indicate in my workflow that the incoming
document will use a namespace?Doug
As you have pointed out Namespaces are not supported at this point
Tony
"Doug Haas" <[email protected]> wrote in message
news:3c90b4a3$[email protected]..
>
I am trying to send an XML event to BPM. The XML's root node has anamespace associated
with it (for example, <bea:Employee>) where "bea" is defined as anamespace in
the top of the document. It looks like BPM does not support namespaces instart
nodes or event nodes. Is there any way to indicate in my workflow thatthe incoming
document will use a namespace? -
PROBLEM WITH XML PUBLISHER AND GRAPH NOT DISPLAYING IN ORACLE APPS
Hi
All you XML Gurus here. I have a problem, When i create a report in XML Publisher desktop i can see a graph im putting into the report on preview and works fine. But when i upload the report as a rtf file into Oracle applications i can see everything else the table logo and stuff .. But just not the Graph Itself when run on the concurrant manager....
Problem number 2
Is there a way that i can use XML Desktop and create a line graph with 2 lines rather than 1 plotting
here is my xml for graph i have made with one line
chart:
<Graph>
<Title text="" visible="true" horizontalAlignment="CENTER"/>
<LocalGridData colCount="{count(.//SELF_OTHERS)}" rowCount="1">
<RowLabels><Label></Label></RowLabels>
<ColLabels>
<xsl:for-each select=".//SELF_OTHERS"> <Label><xsl:value-of select="BEHAVIOUR"/></Label>
</xsl:for-each>
</ColLabels>
<DataValues>
<RowData>
<xsl:for-each select=".//SELF_OTHERS"> <Cell><xsl:value-of select="SCORE"/></Cell>
</xsl:for-each> </RowData>
</DataValues>
</LocalGridData>
</Graph>
All help would be much appreciated to my 2 problems....
Thanks
ShaHi All
Will post solution tomorrow or Monday on blog. Heres the chart XML for now.
chart:
<Graph graphType="LINE_VERT_ABS"><LegendArea visible="true" />
<LocalGridData colCount="{count(xdoxslt:group(.//SALE, 'YEAR'))}" rowCount="3">
<RowLabels>
<Label>SOFTWARE</Label>
<Label>HARDWARE</Label>
<Label>SERVICES</Label>
</RowLabels>
<ColLabels>
<xsl:for-each-group select=".//SALE" group-by="YEAR" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Label>
<xsl:value-of select="current-group()/YEAR" />
</Label>
</xsl:for-each-group>
</ColLabels>
<DataValues>
<RowData>
<xsl:for-each-group select=".//SALE" group-by="YEAR" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Cell>
<xsl:value-of select="sum(current-group()/SOFTWARE)" />
</Cell>
</xsl:for-each-group>
</RowData>
<RowData>
<xsl:for-each-group select=".//SALE" group-by="YEAR" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Cell>
<xsl:value-of select="sum(current-group()/HARDWARE)" />
</Cell>
</xsl:for-each-group>
</RowData>
<RowData>
<xsl:for-each-group select=".//SALE" group-by="YEAR" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Cell>
<xsl:value-of select="sum(current-group()/SERVICES)" />
</Cell>
</xsl:for-each-group>
</RowData>
</DataValues>
</LocalGridData>
</Graph>
with the following data
<?xml version="1.0" encoding="UTF-8"?>
<SALES>
<SALE>
<YEAR>2006</YEAR>
<SOFTWARE>1200</SOFTWARE>
<HARDWARE>850</HARDWARE>
<SERVICES>2000</SERVICES>
</SALE>
<SALE>
<YEAR>2007</YEAR>
<SOFTWARE>1000</SOFTWARE>
<HARDWARE>800</HARDWARE>
<SERVICES>1100</SERVICES>
</SALE>
<SALE>
<YEAR>2008</YEAR>
<SOFTWARE>900</SOFTWARE>
<HARDWARE>1200</HARDWARE>
<SERVICES>1500</SERVICES>
</SALE>
</SALES>
The latest Template Builder makes this a cinch!
Regards
Tim
http://blogs.oracle.com/xmlpublisher -
How to create xml file from Oracle and sending the same xml file to an url
How to create xml file from Oracle and sending the same xml file to an url
SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way. -
How to read the data from XML file and insert into oracle DB
Hi All,
I have below require ment.
I will receive data in the XML file. then i need to read that data and insert into oracle tables. please let me know how this can be handled.
Many Thanks.Sounds a lot like this question, only with less details.
how to read data from XML variable and insert into table variable
We can only help if you provide us details to help as we cannot see what you are doing and only know what you tell us. Plenty of examples abound on the forums that cover the topics you seek as well. -
Oracle xml DB and text features are not installed
HI,
I installed Sql developer 3.0 ,oracle 11g and jdk 7 on centos 5.when iam running sql developer its showing error message oracle xml DB and text features are not installed.
pls anyone help me out.
thanks
srinivas
Edited by: srinivas on Oct 17, 2011 4:49 AMmay be help you
Re: Connection Error - Oracle XMLDB and Text Features are not installed. -
Convert flat file to XML document and store into Oracle database
First:
I have a flatfile and created external table to read that file in Oracle
Now I want to create an XML document for each row and insert into Oracle database, I think that XMLtype.
Could you please provide me some information/steps.
Second:
Is there performance issues, because everyday I need to check that XML document stored in the database against the in coming file.
Thank You.Oracle 11g R2 Sun Solaris
Flat file is | (pipe delimited), so I did create an EXTERNAL Table
row1 a|1|2|3|4
row2 b|2|3|4|5
row3 c|6|7|8|9
I want to store each record as XML document. So it will be easy to compare with next day's load and make insert or update.
The reason is:
First day the file comes with 5 columns
after some days, the file may carry on some additional columns more than 5
In this case I do not want to alter table to capture those values, if I use XML than I can capture any number of columns, CORRECT!. Please make me correct If I am wrong.
This is the only reason to try to use the XMLType (XML Document)
On Everyday load we will be matching these XML documents and update it if there is any column's value changes
daily average load will be 10 millions and initial setup will be 60-80 millions
Do I have anyother option to capture the new values without altering the table.
Please advise!. -
Deleting Message Type name and namespace tag from XML payload
Hi Gurus,
Need help. My payload looks like this
<?xml version="1.0" encoding="utf-8" ?>
- <ns1:MT_O_sss xmlns:ns1="http://sap.com/xi/tm">
- <Job>
<Field name="xxxx" value="" />
<Field name="xxx" value="" />
<Field name="xxx" value="" />
</Job>
</ns1:MT_O_sss>
But The soap webservice is expecting it in
<?xml version="1.0" encoding="utf-8" ?>
- <Job>
<Field name="xxxx" value="" />
<Field name="xxx" value="" />
<Field name="xxx" value="" />
</Job>
I have to remove the message type name and namespace tag.
So how can I achieve this. I am sending this payload using a Receiver Soap Adapter. Please help. I am kind of stuck.hi,
you have to simply add one module in your communication channel
that is XMLAnonymizerBean
you can refer below for help:
Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
hope it helps.
regards,
ujjwal kumar -
Using XML extraction from Oracle and XSLT data transformation
Hi
How can transfer data ie: Using XML extraction from Oracle and XSLT data transformation with java application?
usually i use to do querying sql, getting data from table assinging to model class then send it to UI. how can i go for XML extraction form oracle?
thanksSorry, I don't understand what exactly you want to do. And I'm under the impression that you might not know exactly what you want to do as well. Could you explain a bit more detailed what you want to achieve?
-
I have created a user in oracle BPM but it is not reflected in system-jazn-data.xml file and I am unable to authenticate that user to create context as needed in workflow client
weblogic credentials are different.
and using thode credentials I am able to login to weblogic server
the users I am talking about is the process users defined in realm.
in realm those users are defined as Default authenticator and OID authenticator.
and I am trying to authenticate one of those users defined in realm using java api so that I an access a process defined In Oracle BPM 11g -
Oracle XML parser and schema validation
Hi Forum,
I have problem parsing XML with validation against XML schema. I define location of schema (URL) in xml file and Oracle parser could not find the schema (xml file is correct - checked in other programs). When I point to xml schema directly from Java (using parser.setXMLSchema) before calling parser.parse, it works just fine. Where is the problem? Does oracle parser works correctly with XML Schema?
TIA,
AlexSAXParser saxParser=new SAXParser();
saxParser.setValidationMode(XMLParser.SCHEMA_VALIDATION);
Specify a Schema to validate a XML document with, for the SAXParser.
saxParser.setXMLSchema(SchemaUrl);
DefaultHandler handler=new DefaultHandler();
saxParser.setErrorHandler(handler);
Parse the XML document to validate with the XML schema.
saxParser.parse(XmlDocumentUrl);
Maybe you are looking for
-
I own a one month old HP Omni 220 PC (all in one). The operating system is Windows 7. It is connected to wi-fi network in the home. The Internet portion works fine. And, for about 30 days, it would print to our new wi-fi connected HP Photosmart 7510
-
How to link from another page directly to a photo within a Spry gallery?
I have created a page that has a photo gallery using Donald's tutorial to make a spry photo gallery. I have a need to link to a specific photo in that gallery from another page. I have seen the discussions on how to do this with tabbed panels etc.. b
-
When I was downloading the latest version of itunes on my pc the update failed. I can no longer acces itunes. How can I update the software without overwriting my current itunes libraries? Thanks
-
PROBLEM IN SAVING A FILE AS JAVA FILE
PLEASE TELL ME ANYBODY RELATED TO THIS TOPIC, I WANT TO SAVE MY FILE AS .JAVA FILE ,BUT IT SAVES AS .TXT FILE.
-
PA30 and ESS behave differently when updating other bank details
I am trouble shooting an issue with maintaining other bank details in ESS. In PA30 when a other bank details record is updated SAP code just updates the record with new data. it will change the date changed to sy-datum with no changes to the begda an