XML Namespace in PL/SQL

Hi to all,
I have a problem, when i build a XML document in my PL/SQL, using xmldom class, i want to set xmlns only in root node.
This is my code:
doc xmldom.DOMDocument;
main_node xmldom.DOMNode;
root_node xmldom.DOMNode;
root_elmt xmldom.DOMElement;
root_elmt_attributato xmldom.DOMElement;
BEGIN
doc := xmldom.newDOMDocument;
main_node := xmldom.makeNode(doc);
root_elmt := xmldom.createElement(doc, 'elencoClienti');
root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
xmldom.setAttribute(root_elmt, 'xmlns', 'indirizzo_namespace');
Then i add more than one node to root node, and finally i find in all level-one-parent of a root this attribute
xmlns=""
output example:
<?xml version="1.0" encoding="UTF-8"?>
<elencoClienti xmlns="indirizzo_namespace">
<elenco_pratiche xmlns="">
<rdl>
<id>122</id>
<tipo>PRDL</tipo>
<tran_comm>RDR</tran_comm>
<tipo_lav>TEST</tipo_lav>
<via>Maria Pia</via>
<codice_presa>5003241303200</codice_presa>
<data_protocollo>01/07/2000</data_protocollo>
</rdl>
</elenco_pratiche>
<esito_ricerca xmlns="">
<esito>OKEL</esito>
</esito_ricerca>
</elencoClienti>
both elenco_pratiche and esito_ricerca nodes have attribute xmlns="".
How can i remove that?
Thanks in advance
Teo

I don't have installed DBMS_XMLDOM, the only class I can use is XMLDOM...
My problem seems to be a bug of this class..
So that i solved the problem in this way (my procedure has to write out a xml reply into a clob):
--after to write xml into a clob:
dbms_lob.createtemporary(output_clob,true);
xmldom.writeToClob(doc, output_clob);
xmldom.freeDocument(doc);
-- I remove unwanted attribute
output_clob := REPLACE(output_clob,' xmlns=""','');
Sometimes ignorance is a solution... ;-)
I will install dbms_xmldom and i will try to find solution, but now it seems a good patch
Teo

Similar Messages

  • Single detail Record repeated with xml for in wcf sql for xml polling.

    Hi,
    I am getting a weird results for a inner join of header detail with for xml auto, element.
    If I run the query in sql it gives me master detail results as expected. i.e
    <HEADER>
    <ID>1</ID>
           <DETAIL><ID>1</ID></DETAIL>
         <DETAIL><ID>2</ID></DETAIL>
    </HEADER>
    In BizTalk I configured the receive location and added a root node and the namespace to the binding properties.
    I get results as.
    <HEADER>
    <ID>1</ID>
           <DETAIL><ID>1</ID></DETAIL>
    </HEADER>
    <HEADER>
    <ID>1</ID>
           <DETAIL><ID>2</ID></DETAIL>
    </HEADER>
    Please Advice.
    Thank you and have great day! Vivek Kulkarni MCAD.net

    Hi Vivek,
    Took a while to simulate your issue. The usage of "FOR XML AUTO, ELEMENTS" is generally used in the old SQL-adapter. To get this working in the WCF-SQL adapter, you need to have some properties set which is not explored well.
    The issue is due to the way you have defined the SQL query and the "InboundOperationType" property of the WCF-SQL adapter. Here is the steps I have done to get the result as you wanted in WCF-SQL adapter, the same output as "FOR XML AUTO,
    ELEMENTS " in SQL.
    In the binding of the WCF-SQL adapter, select the  "InboundOperationType" property to "XMLPolling". The default is "Polling". 
    In the "Polling Statement", ensure the SQL statement which will give results the XML-output as you wanted. So if you have used following statement in SQL management studio, then use the same statement in the "Polling Statement" property
    of the Receive location. Ensure you DON'T remove the "For XML AUTO" statement while configuring the SQL query in receive location. As here you have choose "XMLPolling" as the value for  "InboundOperationType"
    property, the output of the SQL statement should be XML. 
    SELECT Header.ID
    ,Detail.ID
    FROM Header
    JOIN Detail ON Detail.OrderHeaderID = Header.ID
    FOR XML AUTO, ELEMENTS
    Note: You can either use SQL select statement or stored procedure. Even if any of these method used to get the resultset from SQL db, ensure it return the output in XML.
    Above query is what I have used to simulate your case, you can change it to suit your actual SQL table and column names.
    In the "PolledDataAvailableStatement" property I have used the following which would ensure that "Polling Statement" statement executes. I assume you're using this to learn how WCF-SQL adapter works, in real time you may need to update
    the query in SQL so that SQL doesn't return the resultset continuously
    SELECT top 1 Header.OrderID
    ,Detail.DetailID
    FROM Header
    JOIN Detail ON Detail.OrderHeaderID = Header.OrderID
    Try the setting, the structure of the output using the above using "XMLPolling" values in "InboundOperationType" property of the receive location binding will be same as the "FOR XML AUTO, ELEMENTS" in SQL. You may need to change
    the rootname property to suit your actual expected output.
    Regards,
    M.R.Ashwin Prabhu
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Generating an xml from a pl/sql procedure

    Hi Friends,
    I have come up with a requirement to generate an xml from a pl/sql procedure.
    I did some R & D and also got some sample procedures but could not understand the datatypes being used.
    The procedure declares variables like this:
    doc                  xmldom.DOMDocument;
    mainNode         xmldom.DOMNode;
    headerElem      xmldom.DOMElement; Pls could anyone tell what do these xmldom.DOMDocument, xmldom.DOMNode and xmldom.DOMElement mean?
    Later in the procedure, these variables are assigned values like
    doc      := xmldom.newDOMDocument;
    mainNode := xmldom.makenode(doc); This went a bouncer on me.
    Pls help.
    Thanks in advance ...!

    You can check this one -- Learned this from michael.
    satyaki>
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    satyaki>
    satyaki>
    satyaki>with person_h
      2  as
      3    (
      4      select 1 id, 'M' gender, 'W' race, '170' weight from dual union all
      5      select 1, 'M', 'W', '170' from dual union all
      6      select 1, 'M', 'W', '180' from dual union all
      7      select 1, 'M', NULL, '175' from dual union all
      8      select 1, NULL, 'W', NULL from dual
      9    )
    10    select xmlelement("Person",(
    11                                 select xmlagg(xmlelement("Sex", gender))
    12                                 from (
    13                                        select distinct gender
    14                                        from person_h
    15                                        where id = 1
    16                                        and gender is not null
    17                                      ) pg
    18                                ),
    19                                (
    20                                  select xmlagg(xmlforest(race as "Race"))
    21                                  from (
    22                                         select distinct race
    23                                         from person_h
    24                                         where id = 1
    25                                       ) pg
    26                                ),
    27                                (
    28                                  select xmlagg(xmlforest(weight as "Weight"))
    29                                  from (
    30                                         select distinct weight
    31                                         from person_h
    32                                         where id = 1
    33                                       ) pg
    34                                 )
    35                     ).getstringval() Res
    36    from dual;
    RES
    <Person><Sex>M</Sex><Race>W</Race><Weight>170</Weight><Weight>175</Weight><Weight>180</Weight></Person>
    satyaki>Regards.
    Satyaki De.

  • Javax.servlet.ServletException: The name "" is not legal for JDOM/XML namespaces

    Dear all,
    First of all sorry, if this is not the right place for my question.
    I am facing some problem with the XFire Webservices. When i am trying to access the WSDL through the url. server is throwing the following exception :
    javax.servlet.ServletException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
         org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:143)
         org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    root cause
    org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
         org.jdom.Namespace.getNamespace(Namespace.java:164)
         org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelper.java:58)
         org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:560)
         org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
         org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
         org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocLitPart(WSDLBuilder.java:403)
         org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createPart(WSDLBuilder.java:355)
         org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParameters(WSDLBuilder.java:509)
    cont.......
    I am not able to figure out the root cause for this. The service.xml file looks like below:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- START Service.xml -->
    <beans xmlns="http://xfire.codehaus.org/config/1.0">
    <!-- Construct the castor service factory by Spring -->
    <bean id="castorTypeRegistry" class="org.codehaus.xfire.castor.CastorTypeMappingRegistry"/>
    <bean id="bindingProvider" class="org.codehaus.xfire.aegis.AegisBindingProvider">
    <constructor-arg ref="castorTypeRegistry"/>
    </bean>
    <bean id="castorServiceFactory" class="org.codehaus.xfire.service.binding.ObjectServiceFactory">
    <constructor-arg index="0" ref="xfire.transportManager"/>
    <constructor-arg index="1" ref="bindingProvider"/>
    </bean>
    <service>
    <name>ReleaseManager</name>
    <namespace>ReleaseManager</namespace>
    <serviceClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManager</serviceClass>
    <implementationClass>com.pinkroccade.jfoundation.calculation.releases.ReleaseManagerImpl</implementationClass>
    <schemas>
    <schema>META-INF/schema/release-impact-worksheet-3.2.0.xsd</schema>
    </schemas>
    <style>document</style>
    <serviceFactory>#castorServiceFactory</serviceFactory>
    </service>
    </beans>
    <!-- END Service.xml-->
    The issue which i am facing is it due to the problem with the service.xml (Which i dont think so..), Or is it any thing to do with the XSD file which i am using.
    Can any body give me some guide lines for this ????
    Thanks in advance.
    Thanks and Regards,
    Manjunath.

    Any one any thoughts..
    I need to find out the solution for this as soon as possible; Not able to proceed further...
    Thanks and Regards,
    Manjunath.

  • Creating XML report using PL/SQL Stored Procedure

    Hi Friends,
    I am working on an xml report with the xml source as PL/SQL Stored Procedure.
    I am referring the exercise shown in the following link to understand the process:
       http://orclapp.blogspot.com/2012/02/developing-xml-publisher-report-using.html
    In the example shown in the above link I could not understand the following:
    1) In the following procedure, the out parameter 'retcode' is not used at all.
       What is the importance of this parameter.
        PROCEDURE REPORT (errbuf  OUT VARCHAR2, retcode  OUT VARCHAR2, p_product_id   IN     NUMBER)
    2)  After the xml data is prepared and put to 'l_result' Clob variable, the following
        Loop is executed. I am not able to appreciate why the following loop is required.
         LOOP
             EXIT WHEN l_length = l_retrieved;
             IF (l_length - l_retrieved) < 32000
             THEN
                SELECT SUBSTR (l_result, l_retrieved + 1) INTO l_xmlstr FROM DUAL;
                l_retrieved := l_length;
                fnd_file.put_line (fnd_file.output, l_xmlstr);
             ELSE
                SELECT SUBSTR (l_result, l_retrieved + 1, l_offset)
                  INTO l_xmlstr
                  FROM DUAL;
                l_retrieved := l_retrieved + l_offset;
                fnd_file.put_line (fnd_file.output, l_xmlstr);
             END IF;
         END LOOP;
    3) In the example it is not explained how the concurrent program gets the xml data?
       I assume it is written to a file using the following line of code:
        fnd_file.put_line (fnd_file.output, l_xmlstr);
       I would appreciate if anyone can throw some light into my above queries so that I can understand the process clearly.
    Thanks & Regards
    Hawker

    Hi 32000 in the code is a 'safe' size smaller than the max available 32767, the loops purpose is to move through the entire thing in chunks that will be manageable in the limits of the data type.
    Btw; if you are in Oracle e-business suite then you can also use Oracle reports very simply to create XML output.
    If you have reports developer all you need to do is put raw sql (without any 'artifice' to create XML) in the report SQL and then set the reports output to XML in the program definition in Oracle e-business.
    best regards,
    Robert.

  • Loading XML parser for PL/SQL

    I am working my way thru 'Building Oracle XML Applications' by Steve Muench.
    I am getting a problem when I try to install the XML parser for PL/SQL
    The following errors occur when I try to do
    loadjava -v -r -u xmlbook/xmlbook xmlparserv2.jar
    initialization complete
    loading : oracle/xml/parser/v2/XMLByteReader
    creating : oracle/xml/parser/v2/XMLByteReader
    Error while creating class oracle/xml/parser/v2/XMLByteReader
    ORA-29545: badly formed class: User has attempted to load a class (oracle.xml.parser.v2.XMLByteReader) into a restricted package. Permission can be granted using dbms_java.grant_permission(<user>, LoadClassInPackage...
    loading : oracle/xml/parser/v2/PrintDriver
    creating : oracle/xml/parser/v2/PrintDriver
    Error while creating class oracle/xml/parser/v2/PrintDriver
    ORA-29545: badly formed class: User has attempted to load a class (oracle.xml.parser.v2.PrintDriver) into a restricted package. Permission can be granted using dbms_java.grant_permission(<user>, LoadClassInPackage...
    resolving: oracle/xml/parser/v2/PrintDriver
    Error while resolving class oracle/xml/parser/v2/PrintDriver
    ORA-04043: object /a065289c_PrintDriver does not exist
    resolving: org/w3c/dom/html/HTMLAnchorElement
    Error while resolving class org/w3c/dom/html/HTMLAnchorElement
    ORA-04043: object /564607d_HTMLAnchorElement does not exist
    About 20 classes get loaded correctly. All the rest get ORA-29545 or ORA-04043 errors.
    I expect the ORA-04043 errors are a result of the earlier errors.
    The documentation seems to indicate that there is no need to do
    dbms_java.grant_permission to load into your own schema.
    I have NT4 (sp6)
    Oracle 8.1.7
    xmlparserv2.jar dated 24/8/2001 17:01 size 1,177,259
    xmlparserv2_2027.jar gives the same errors.
    Any help would be appreciated.
    null

    Was it definitely xmlparsev2.jar that you had to load?
    I recently started going through some of these examples as well and found that the standard xml parser was there but that I needed to load the xml parser for PL/SQL. I did this using loadjava from a subdirectory within the xdk directory and everything worked fine.

  • Issue with XML namespace and Message structure

    Hi All,
    I am using Oracle SOA Suite 11.1.1.4. I have SOA web service application one-way messaging wherein I keep receiving messages from the third party. The issue I am facing is with the XML namespaces which conflicts with the third party's message structure. The details are as below.
    Our Web-service WSDL*
    <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
    targetNamespace="http://amb.com/cad/RealTimeService"
    xmlns:cad="http://amb.com/cad/RealTimeService"
    xmlns:avl="http://schemas.com/asiapac/cad/datamodel/avl/1.0.0"
    xmlns:evn="http://schemas.com/asiapac/cad/datamodel/event/1.0.0"
    xmlns:uni="http://schemas.com/asiapac/cad/datamodel/unit/1.0.0"
    xmlns:dvt="http://schemas.com/asiapac/cad/datamodel/divert/1.0.0"
    xmlns:sui="http://schemas.com/asiapac/cad/datamodel/suppinfo/1.0.0"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://schemas.com/cad/datamodel/avl/1.0.0"
    schemaLocation="AvlCadSchema.xsd"/>
    <import namespace="http://schemas.com/cad/datamodel/unit/1.0.0"
    schemaLocation="UnitCadSchema.xsd"/>
    <import namespace="http://schemas.com/cad/datamodel/event/1.0.0"
    schemaLocation="EventCadSchema.xsd"/>
    <import namespace="http://schemas.com/cad/datamodel/divert/1.0.0"
    schemaLocation="HewsCadSchema.xsd"/>
    <import namespace="http://schemas.com/cad/datamodel/suppinfo/1.0.0"
    schemaLocation="SupplementalInformationCadSchema.xsd"/>
    <element name="AvlAuxData" type="avl:AvlAuxData" nillable="true"/>
    <element name="AgencyEvent" type="evn:AgencyEvent"/>
    <element name="Diversion" type="dvt:HospitalDiversionMessage"/>
    <element name="SupplementalInformation" type="sui:SupplementalInformation"/>
    <element name="UnitDetail" type="uni:UnitDetail"/>
    </schema>
    Using SOAP UI tool a HospitalDiversionMessage Request for the above WSDL will look like*
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:real="http://amb.com/cad/RealTimeService" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
    <soapenv:Header/>
    <soapenv:Body>
    <*real*:Diversion>
    <ns:Action>?</ns:Action>
    <ns:Open>?</ns:Open>
    <!--Optional:-->
    <ns:Location>?</ns:Location>
    <ns:Type>?</ns:Type>
    <ns:SubType>?</ns:SubType>
    <!--Optional:-->
    <ns:ExpiryTimestamp>?</ns:ExpiryTimestamp>
    <!--Optional:-->
    <ns:Comment>?</ns:Comment>
    <!--Optional:-->
    <ns:ItemNumber>?</ns:ItemNumber>
    <!--Optional:-->
    <ns:Notifications>?</ns:Notifications>
    <ns:CreatedTerminal>?</ns:CreatedTerminal>
    <ns:CreatedTimestamp>?</ns:CreatedTimestamp>
    <!--Optional:-->
    <ns:ClosedBy>?</ns:ClosedBy>
    <!--Optional:-->
    <ns:ClosedComments>?</ns:ClosedComments>
    <!--Optional:-->
    <ns:ClosedTerminal>?</ns:ClosedTerminal>
    <!--Optional:-->
    <ns:ClosedTimestamp>?</ns:ClosedTimestamp>
    </real:Diversion>
    </soapenv:Body>
    </soapenv:Envelope>
    Now the third party sends a HospitalDiversionMessage in this format_
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://amb.com/cad/RealTimeService" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
    <soapenv:Header/>
    <soapenv:Body>
    <ns0:Diversion>
    <ns0:Action>?</ns0:Action>
    <ns0:Open>?</ns0:Open>
    <!--Optional:-->
    <ns0:Location>?</ns0:Location>
    <ns0:Type>?</ns0:Type>
    <ns0:SubType>?</ns0:SubType>
    <!--Optional:-->
    <ns0:ExpiryTimestamp>?</ns0:ExpiryTimestamp>
    <!--Optional:-->
    <ns0:Comment>?</ns0:Comment>
    <!--Optional:-->
    <ns0:ItemNumber>?</ns0:ItemNumber>
    <!--Optional:-->
    <ns0:Notifications>?</ns0:Notifications>
    <ns0:CreatedTerminal>?</ns0:CreatedTerminal>
    <ns0:CreatedTimestamp>?</ns0:CreatedTimestamp>
    <!--Optional:-->
    <ns0:ClosedBy>?</ns0:ClosedBy>
    <!--Optional:-->
    <ns0:ClosedComments>?</ns0:ClosedComments>
    <!--Optional:-->
    <ns0:ClosedTerminal>?</ns0:ClosedTerminal>
    <!--Optional:-->
    <ns0:ClosedTimestamp>?</ns0:ClosedTimestamp>
    </ns0:Diversion>
    </soapenv:Body>
    </soapenv:Envelope>
    Questions*
    1) I cannot figure out how the SOAPUI tool or SOA substitutes "real" as the namespace prefix for the WSDL based HospitalDiversionMessage and what I need to do at my end to match the message structure as per what the third party needs.
    2) I need ns0 namespace prefix to whole of Diversion xml element. Currently it is "real" at top Diversion element and "ns" for its children
    Please suggest, I can attach the other imported XSD if need be.
    Thanks
    Edited by: user5108636 on Jun 13, 2011 6:55 PM
    Edited by: user5108636 on Jun 13, 2011 6:57 PM
    Edited by: user5108636 on Jun 13, 2011 7:02 PM

    Questions
    1) I cannot figure out how the SOAPUI tool or SOA substitutes "real" as the namespace prefix for the WSDL based HospitalDiversionMessage and what I need to do at my end to match the message structure as per what the third party needs.The xml namespace suffixes like real and ns0 are just references used by the XML Parsers. For that matter the "real" can be xyz as well.
    You dont need to make any changes as long as the xml namespace suffixes refer to the same namespace.
    If you see the first soapUI xml and the third party xml have the same namespace references and hence it is not a problem:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:real="*http://amb.com/cad/RealTimeService*" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
    <soapenv:Header/>
    <soapenv:Body>
    <*real*:Diversion>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="*http://amb.com/cad/RealTimeService*" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
    <soapenv:Header/>
    <soapenv:Body>
    <*ns0*:Diversion>
    2) I need ns0 namespace prefix to whole of Diversion xml element. Currently it is "real" at top Diversion element and "ns" for its childrenBased on this, logically both the xmls represent the same xml message. And hence you dont need to make any changes.
    Please refer to the basics of xml namespaces using the following links:
    http://en.wikipedia.org/wiki/XML_namespace
    http://zvon.org/comp/r/tut-Namespace.html#Pages~Introduction
    Let us know if you still need clarification.
    Hope this helps.
    Thanks,
    Patrick

  • XML namespace in xml converted pdf

    Hello everyone
    I have a problem when converting pdf's in xml. Everytime when I convert a PDF(either with Acrobat or with mailing the file as XML) in XML the date fields always in middle shows the xml namespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" . We are using these xml's to transfer data to an accounting software but the software recognizes the xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" as an error and because of that the data couldn't be uploaded. We created the PDF using a xsd scheme made in the accounting software. Is there a way to get rid of xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" showing in the date fields.
    I appreciate every possible help

    Hi,
    It sounds like you have the nillable="true" attribute in you XSD for the date field.
    If you XSD looks like;
    <xs:element name="Date1" type="xs:date" nillable="true"/>
    Then you will get the following when the field Date1 is bound to is left blank.
    <Date1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    This is the correct behaviour, so I am either not understanding the problem or there is a bug in the accounting software you are using.
    Maybe you could try replacing the nullable="true" with a minOccurs="0".  This will mean the element will not appear in the XML at all.
    Regards
    Bruce

  • Idoc to XML, namespace is not getting created in output XML

    Hi All
    My interface is idoc to XML.
    I am using graphical message mapping.
    In output xml , namespace is not  formed
    Can any one tell why namespace is not  created in the XML and
    How to add the  namespace to the  output XML .
    Kindly help
    Regards,
    Sheela

    Hi,
    You can change your external definition to achieve it.  just compare the structure of your xsd with some other normal data type xsd and change accordingly.
    Inder

  • XML parsing problems with Oracle XML parser for PL/SQL

    I am using the Oracle XML parser for PL/SQL to transform XML into HTML usign XSL. The parser gives me sporadic errors trying to parse various XML documents. For the same XML source, the XMLPARSER will parse without errors one day and the next day will give me errors such as "invalid char in text", "Expected ';'.", or even Java null pointer exceptions.
    I have verified that the XML sources are well formed, so I am pretty certain that the problems I am having are bugs in the XMLPARSER.
    Is there going to be a XML parser for PL/SQL version 2 that will fix these bugs? If so, when??? If not, is there anything else I could do to fix these problems?
    Thanks!

    You can use the latest version.

  • VerifyError #1025 - default xml namespace and getter function

    I have narrowed the problem down to a a few lines. I have
    created a simple example of the problem...
    // TestClass.as
    package {
    import flash.events.EventDispatcher;
    public class TestClass extends EventDispatcher {
    private var _testVar:String;
    public function TestClass() {
    var testXML:XML = <node1 xmlns="
    http://www.testurl.com/"><node2><node3>some
    words of wisdom</node3></node2></node1>;
    default xml namespace = testXML.namespace("");
    _testVar = testXML.node2.node3;
    public function get testVar():String {
    return _testVar;
    // Test.fla - frame 1
    import TestClass;
    var myTestClass:TestClass = new TestClass();
    var someVar:String = myTestClass.testVar;
    trace(someVar);
    I get the following error...
    verify TestClass/get testVar()
    stack:
    scope: [global Object$ flash.events::EventDispatcher$
    TestClass$]
    locals: TestClass
    0:getlocal0
    stack: TestClass
    scope: [global Object$ flash.events::EventDispatcher$
    TestClass$]
    locals: TestClass
    1:pushscope
    stack:
    scope: [global Object$ flash.events::EventDispatcher$
    TestClass$] TestClass
    locals: TestClass
    2:getlocal1
    VerifyError: Error #1025: An invalid register 1 was accessed.
    at TestClass/get testVar()
    at Test_fla::MainTimeline/Test_fla::frame1()
    However if I take out the default xml namespace line, and
    create a new namespace it will work.
    var testNS:Namespace = new Namespace(testXML.namespace(""));
    _testVar = testXML.testNS::node2.testNS::node3;
    Thoughts??? It's driving me crazy. Thanks in advance...
    levi

    The attribute should be in the element's namespace. If I run this snippet on the timeline, it outputs the correct values.
    var xml:XML =
    <xml>
    <animal type="sheep" xmlns="http://blabla">
      <name>josh</name>
      <age>2</age>
    </animal>
    <animal type="cow" xmlns="http://blabla">
      <name>jim</name>
      <age>2</age>
    </animal>
    </xml>
    var ns:Namespace = new Namespace("http://blabla");
    default xml namespace = ns;
    trace( xml.animal.@type ); // OUTPUT: sheepcow

  • Default xml namespace = v hangs app

    This is probably due to my relative inexperience with Flex (using FlashBuilder 4.5 and Flex SDK 3.6) but I've got an app that is acting strangely and I'd like to find out what's wrong.
    Briefly, I'm trying to parse some XML (returned from a REST service) and, within a private function, am creating a namespace (call it v). I then use the directive default xml namespace = v. However, upon trying to launch and debug the app it hangs at application startup. The default directive is in a private function (actually a function called only when my HTTP service completes) of a component. Regardless, if I comment out the default directive the application works normally.
    Again, this function isn't even CALLED unless I essentially click a button to access the service, so I have absolutely no idea why it appears to be affecting the loading of my app.
    I have used Google to search for "Flex default xml namespace hangs app" but have found only one reference (in passing, with no solution offered).
    Thanks for any pointers.

    I will try at some point but I can't cut down my current app to do it, it's just too large.
    However, I did debug the app and I saw what the problem is. My view component, located in (for example) com.xyz.myapp.view, loads several other components, all located in com.xyz.myapp.components. As a result, the Panel component in the View contains  (among other directives) xmlns:components="com.xyz.myapp.components.*". Both the namespace variable v and the default xml namespace directive are in a private function in one of the components the main view loads. When I ran the app under the debugger it terminated almost immediately with "Error 1065: variable com.xyz.mypp.components::v is not defined".
    That's all I can tell you for now.
    Thanks for the reply.

  • Default xml namespace and attributes

    Hi,
    I was trying to use default xml namespaces, but came upon something strange.
    I got the following piece of xml:
    <animal type="sheep" xmlns="http://blabla">
        <name>josh</name>
        <age>2</age>
    </animal>
    and the following code
    public static var ns:Namespace = new Namespace("http://blabla");
    var xml:XML; // xml will be read into this var, not going into details here
    public function myfunc():void {
      default xml namespace = ns;
      trace(  xml.animal.@type );
    now for some reason, the elements are correctly traversed using the default namespace. But the attribute isn't found. After a bit of debugging, I found that I could only retrieve the attribute when using xml.animal.attribute(new QName("", "type")). Am I doing something wrong here? Why isn't the attribute in the same default namespace as the element?
    Kind regards,
    Jan

    The attribute should be in the element's namespace. If I run this snippet on the timeline, it outputs the correct values.
    var xml:XML =
    <xml>
    <animal type="sheep" xmlns="http://blabla">
      <name>josh</name>
      <age>2</age>
    </animal>
    <animal type="cow" xmlns="http://blabla">
      <name>jim</name>
      <age>2</age>
    </animal>
    </xml>
    var ns:Namespace = new Namespace("http://blabla");
    default xml namespace = ns;
    trace( xml.animal.@type ); // OUTPUT: sheepcow

  • Oracle8.1.5 and XML parser for PL/SQL

    Hi,
    Does XML parser for PL/SQL work with Oracle 8.1.5? Did any one install the
    same and if so what are steps to follow? I ran initjvm.sql to install
    JServer and then tried to load jar files using loadjava, but it's giving
    error. It's working fine with Oracle8.1.6.
    Any idea?
    Thanks,
    Jayanta
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jayanta Ghosh ([email protected]):
    Hi,
    Does XML parser for PL/SQL work with Oracle 8.1.5? Did any one install the
    same and if so what are steps to follow? I ran initjvm.sql to install
    JServer and then tried to load jar files using loadjava, but it's giving
    error. It's working fine with Oracle8.1.6.
    Any idea?
    Thanks,
    Jayanta<HR></BLOCKQUOTE>
    Oracle XML Parser has differents distributions for 8.1.5 and 8.1.6 databases, try the correct version, then runs the oraclexmlsqlload.csh from the lib directory of XSU distribution.
    Best regards, Marcelo.
    null

  • Error with XML Generation throgh PL/SQL

    Hi All,
    I am generating an XML Script through PL/SQL Procedure i.e. FND_FILE.PUT_LINE(FND_FILE.OUTPUT, '<SOMETAG>') like this.
    When I tried to run this PL/SQL Procedure from Apps, it is generating the OUTPUT file correctly and I am able to see the XML script also in OUTPUT File. But when I tried to save it to my local machine and Open in Notepad then it contains the follwing data.
    Authentication failed.
    When I tried to open the XML through IE, I am getting the following Error message.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/Documents and Settings/rxr4669/Desktop/OTL_...
    Authentication failed.
    +^+
    Even I am unable to load this XML Data into Template Builder for BI Publisher in order to generate the Layout Temlate (RTF).
    What is this Error ? How to get rid of this ?
    Please help me.
    Thanks !

    Found the issue.
    This is because of some special characters in XML. For more information on this please view the below page.
    [http://www.devx.com/tips/Tip/14068]
    Thanks !
    Edited by: Rajasekhar Reddy on May 9, 2012 3:37 AM

Maybe you are looking for

  • How do I sync iTunes music to two different iPhones on two different user accounts?

    I have read some posts and a help article about this, but I need some clarification becuause what I'm doing is not working out correctly.  My wife syncs her iPhone and iPod to her iTunes.  I recently purchased an iPhone and am going to sync it to my

  • How and Where to change ESS payslip property as READ only Mode

    Hi,   We are SAP ECC5.0 and using EP6 for ESS payslip. We have a problem launching ESS payslip for those employees who have Acrobat Editor and Reader installed. One can actually change the payslip information via Acrobat Editor when click onto PRINT

  • Linux/Mac

    ok, i'm gettng a new 120 GB HD for my ibook G4, and i want to dual boot 10.3.9 and Yellow Dog Linux, well, on the yellow dog site, it says u have to reformat the HD (no prob since its blank anyway) and they reinstall MAC OS, well, i made a clone of m

  • Cnt download app world

    cnt download app world??? keeps sayin refresh page

  • Can I stop the hourly back up?

    I don't need hourly back ups for the day, once a day would be great! Or maybe every 6 or 12 hours. Can i stop the hourly back ups?