SQL XML Variable Assignment?

Maybe more of a code question, but used in B1i. Using the B1out type="sql" how do I assign the return value of:
Select CardCode From [OCDR] Where U_CSTN = <xsl:value-of select="col[8]"/>
to a xml variable? Maybe a simple question but I am having issues using the return value that I need in a B1out type="object" in the same atom.
All responses deeply appreciated,
Mike
<xsl:template name="transform">
     <b1im_multimsg xmlns="">
                   <xsl:for-each select="$msg/row">
               <b1im_msg>
                    <B1out type="sql">
                         <xsl:variable name="Code">
                              <sql>Select CardCode From [OCRD] Where U_DTNCN = <xsl:value-of select="col[8]"/></sql>
                         </xsl:variable>
                    </B1out>
                    <B1out type="object">
                         <Documents>
                              <row>
                                   <CardCode>
                                        <xsl:copy-of select="$Code"/>
                                   </CardCode>
                              </row>
                         </Documents>
                         <Document_Lines>
                              <row>
                                   <ItemCode>
                                        <xsl:value-of select="col[2]"/>
                                   </ItemCode>
                                   <Quantity>
                                        <xsl:value-of select="col[3]"/>
                                   </Quantity>
                              </row>
                         </Document_Lines>
                    </B1out>
               </b1im_msg>
          </xsl:for-each>
     </b1im_multimsg>
</xsl:template>

I has an immediate suspicion it might be related to the issue
mentioned in
http://otn.oracle.com/support/tech/sql_plus/htdocs/sub_var2.html#2_7
but this proved wrong: the SP2-306 still occurs in the latest
SQL*Plus.
I wonder what version of 8i you had working? With an old SQL*Plus
8.1.7.0 my connection failed the same as in 9.2 and 10i.
My solution was to do:
  SQLPLUS='sqlplus -s'
  UNPW='/ as sysdba'
  $SQLPLUS "$UNPW" &lt;&lt;EOF
  EOFThis worked in 9.2.0.5, 10.1.0.2 and 8.1.7.0.
One common security risk on UNIX remains: putting the username and
password on the command line. On some systems a "ps" command will
show the password to any user. If OS authentication cannot be used
for connection, perhaps putting the username/password in the SQL
script may be more secure?
A final note is that in SQL*Plus 10g, no quotes are needed around
AS SYSDBA, i.e.
  sqlplus / as sysdba works from the OS prompt, whereas in 9.2 you need to do
  sqlplus "/ as sysdba"This makes a solution easy:
  SQLPLUS="/usr/oracle/product/10.1.0/bin/sqlplus -s xxx/xxxxxx@xxxx as sysdba"-- CJ

Similar Messages

  • SQL*Plus variable assignment works for 8i but not 9i

    We have scripts that connect to each database on the box and perform database tasks nightly. The scripts first set the environment then connects to each database with SQL*Plus. This works for 8i but fails in the recently created 9i environment. (Unix Solaris environment)
    Because the SQL*Plus connection appears in many areas in the scripts, we assign the following connection string to a variable:
    SQLPLUS="/usr/oracle/product/9.2.0/bin/sqlplus -s 'xxx/xxxxxx@xxxx as sysdba'"
    Export SQLPLUS
    echo "$SQLPLUS"
    (This echo out correctly: /usr/oracle/product/9.2.0/bin/sqlplus -s 'xxx/xxxxxx@xxxx as sysdba')
    It fails when the script calls the assigned variable:
    $SQLPLUS <<-EOF
    with the following error:
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    However, if I remove the SQLPLUS variable assignment and changed all occurrence of
    $SQLPLUS <<-EOF to
    /usr/oracle/product/9.2.0/bin/sqlplus -s 'xxx/xxxxxx@xxxx as sysdba' <<-EOF
    Then the script runs successfully. But this solution is cumbersome.
    Any ideas as to how to have the script work with assigning the SQLPLUS variable????
    Any help is appreciated.

    I has an immediate suspicion it might be related to the issue
    mentioned in
    http://otn.oracle.com/support/tech/sql_plus/htdocs/sub_var2.html#2_7
    but this proved wrong: the SP2-306 still occurs in the latest
    SQL*Plus.
    I wonder what version of 8i you had working? With an old SQL*Plus
    8.1.7.0 my connection failed the same as in 9.2 and 10i.
    My solution was to do:
      SQLPLUS='sqlplus -s'
      UNPW='/ as sysdba'
      $SQLPLUS "$UNPW" &lt;&lt;EOF
      EOFThis worked in 9.2.0.5, 10.1.0.2 and 8.1.7.0.
    One common security risk on UNIX remains: putting the username and
    password on the command line. On some systems a "ps" command will
    show the password to any user. If OS authentication cannot be used
    for connection, perhaps putting the username/password in the SQL
    script may be more secure?
    A final note is that in SQL*Plus 10g, no quotes are needed around
    AS SYSDBA, i.e.
      sqlplus / as sysdba works from the OS prompt, whereas in 9.2 you need to do
      sqlplus "/ as sysdba"This makes a solution easy:
      SQLPLUS="/usr/oracle/product/10.1.0/bin/sqlplus -s xxx/xxxxxx@xxxx as sysdba"-- CJ

  • Assigning a node value from an XML variable to a String type  in Weblogic Process Integrator

    Hi,
    Is there any way to assign a node value from an XML variable to a String variable
    in Weblogic Process Integrator...
    Thanx.
    Narendra.

    Nerendra
    Are you talking about using Xpath on the XML document and assigning to a
    variable, it is unclear what you are asking
    Tony
    "Narendra" <[email protected]> wrote in message
    news:3bba1215$[email protected]..
    >
    Hi,
    Is there any way to assign a node value from an XML variable to a Stringvariable
    in Weblogic Process Integrator...
    Thanx.
    Narendra.

  • Execute SQL Task: Cannot assign value to the variable

    DECLARE
    @PartitionDate varchar(8),
    @Date int
    SELECT
    @PartitionDate = MAX(PartitionDate)
    FROM PartitionLog (NOLOCK)
    SELECT
    @Date = MIN(DateKey)
    FROM DimDate WHERE CAST(DateKey as varchar(8)) > @PartitionDate
    IF NOT CONVERT(varchar(8),GETDATE(),112) = @PartitionDate
    SELECT @PartitionDate = CAST(DateKey as varchar(8))
    FROM DimDate (NOLOCK)
    WHERE DateKey = @Date
    SELECT @PartitionDate AS PartitionDate ,
    'IISDW_' + @PartitionDate AS PartitionName
    GO
    I have the above SQL stmt in the excute SQL task and declared 2 variable "PartitionDate" and "PartitionName" in the Package, the RESULT SET I hav given as "Single Row" and when I run the ETL I get the error as 
    [Execute SQL Task] Error: An error occurred while assigning a value to variable "PartitionDate": "Exception from HRESULT: 0xC0015005".

    Does your package variable datatype match the datatype of your parameter?
    Is your Package variable assigned to the parameter in the task editor?
    And does the parameter name in the task editor match the parameter names in your stored procedure?

  • Passing PL/SQL varchar2 variable to XML Query

    Hi guys,
    i'm having trouble passing a pl/sql varchar2 variable to an XMLQuery.
    This is the relevant part of my code:
    DECLARE
       lo_result   XMLTYPE;         --contains the XML which is being parsed below
       lo_return   XMLTYPE;             -- for the XML result returned by XMLQuery
       lo_start    VARCHAR2 (100) DEFAULT 'Toronto'; -- a PL/SQL varchar2 variable
       lo_end      VARCHAR2 (100) DEFAULT 'Ottawa';  -- a PL/SQL varchar2 variable
    BEGIN
       SELECT XMLQUERY (
                 'for $i in //leg[start_address[text()[contains(.,$lo_start)]] and end_address[text()[contains(.,$lo_end)]]]/distance/value/text() return ($i)'
                 PASSING lo_result, lo_start AS "lo_start", lo_end AS "lo_end"
                 RETURNING CONTENT)
         INTO lo_return
         FROM DUAL;
    END;The XPath expression is correct but it doesn't seem to accept my variables since lo_return is empty.
    I think the variables should be of type Xmltype but the compiler won't let me convert them because they do not contain any XML tags .
    Hope anyone can help.
    Thanks,
    Martina

    may be i missed anything but
    >
    <start_address>Toronto, Ontario, Kanada</start_address>
    <end_address>Huntsville, Alabama, Vereinigte Staaten</end_address>
    >
    and
    >
    lo_start VARCHAR2 (100) DEFAULT 'Toronto'; -- a PL/SQL varchar2 variable
    lo_end VARCHAR2 (100) DEFAULT 'Ottawa'; -- a PL/SQL varchar2 variable
    >
    so
    SQL> SELECT XMLQUERY (
      2              'for $i in //leg[start_address[text()[contains(.,$lo_start)]] and end_address[text()[contains(.,$lo_end)]]]/distance/value/text() return ($i)'
      3               PASSING
      4               xmltype('<DirectionsResponse>
      5    <status>OK</status>
      6    <route>
      7      <summary>I-75 N</summary>
      8      <leg>
      9        <duration>
    10          <value>48220</value>
    11          <text>13 Stunden, 24 Minuten</text>
    12        </duration>
    13        <distance>
    14          <value>1404935</value>
    15          <text>1.405 km</text>
    16        </distance>
    17        <start_location>
    18          <lat>43.6533100</lat>
    19          <lng>-79.3827700</lng>
    20        </start_location>
    21        <end_location>
    22          <lat>34.7303300</lat>
    23          <lng>-86.5860700</lng>
    24        </end_location>
    25        <start_address>Toronto, Ontario, Kanada</start_address>
    26        <end_address>Huntsville, Alabama, Vereinigte Staaten</end_address>
    27      </leg>
    28    </route>
    29  </DirectionsResponse>'),
    30               'Toronto' AS "lo_start", 'Ottawa' AS "lo_end"
    31               RETURNING CONTENT)
    32       FROM DUAL;
    XMLQUERY('FOR$IIN//LEG[START_A
    SQL>
    SQL>
    SQL>
    SQL> SELECT XMLQUERY (
      2              'for $i in //leg[start_address[text()[contains(.,$lo_start)]] and end_address[text()[contains(.,$lo_end)]]]/distance/value/text() return ($i)'
      3               PASSING
      4               xmltype('<DirectionsResponse>
      5    <status>OK</status>
      6    <route>
      7      <summary>I-75 N</summary>
      8      <leg>
      9        <duration>
    10          <value>48220</value>
    11          <text>13 Stunden, 24 Minuten</text>
    12        </duration>
    13        <distance>
    14          <value>1404935</value>
    15          <text>1.405 km</text>
    16        </distance>
    17        <start_location>
    18          <lat>43.6533100</lat>
    19          <lng>-79.3827700</lng>
    20        </start_location>
    21        <end_location>
    22          <lat>34.7303300</lat>
    23          <lng>-86.5860700</lng>
    24        </end_location>
    25        <start_address>Toronto, Ontario, Kanada</start_address>
    26        <end_address>Huntsville, Alabama, Vereinigte Staaten</end_address>
    27      </leg>
    28    </route>
    29  </DirectionsResponse>'),
    30               'Toronto' AS "lo_start", /*'Ottawa'*/'Huntsville' AS "lo_end"
    31               RETURNING CONTENT)
    32       FROM DUAL;
    XMLQUERY('FOR$IIN//LEG[START_A
    1404935
    SQL>

  • Why can't Workbench handle a 2MB XML variable from invoke?

    I have an SQL query that returns about 2.3 MB XML variable.  That works fine but if I set that variable to be an output variable and invoke the process from Workbench I get an InvocationTargetException from org.apache.axis.message.SOAPFaultBuilder.createFault (see below).  I'm running Workbench ES2 9.5 as a Java plugin in Eclipse Indigo (32-bit) on a Windows 7 64-bit system with 8 GB memory.  The same problem occurs on a Windows XP SP3 system with 4GB memory. 
    There are no error messages in server.log at all, just the usual SqlHelper message displaying the SQL statement that was executed.  This appears to be strictly a Workbench phenomenon.  The server seems to be able to merge the data with a PDF just fine also.
    Here's my eclipse.ini file settings:
    -startup
    plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
    -product
    org.eclipse.epp.package.jee.product
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256M
    --launcher.defaultAction
    openFile
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms512m
    -Xmx1280m
    Here is the stack trace from the invocation error:
    ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
          at   com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.throwExceptionHandler(SoapAxisDispatcher.java:211)
          at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatcher.java:129)
          at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:66)
          at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
          at com.adobe.workbench.utils.invoke.InvokeWithProgressRunner.invokeServiceOperation(InvokeWithProgressRunner.java:230)
          at com.adobe.workbench.utils.invoke.InvokeWithProgressRunner.run(InvokeWithProgressRunner.java:125)
          at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.reflect.InvocationTargetException
          at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
          at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
          at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
          at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
          at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
          at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
          at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at javax.xml.parsers.SAXParser.parse(Unknown Source)
          at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
          at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
          at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
          at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
          at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
          at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
          at org.apache.axis.client.Call.invoke(Call.java:2748)
          at org.apache.axis.client.Call.invoke(Call.java:2424)
          at org.apache.axis.client.Call.invoke(Call.java:2347)
          at org.apache.axis.client.Call.invoke(Call.java:1804)
          at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatcher.java:127)
          ... 5 more

    I don't quite follow what you are recommending but this is really a nuisance.  We can record the process and the play back works just fine, all the way to the end.  There's a post to this forum that only shows up on Google Groups that points to the Apache Axis SOAPFaultBuilder source code (the first line of the 'Caused by' stack trace). The only place I can find that class in my setup (32-bit Eclipse Indigo with LC Workbench plugin) is in eclipese\.metadata\.plugins\org.apache.axis_1.4.0.v201005080400\lib\axis.jar.  So I'll replace that with a newer version and see what happens.

  • Strange Behavior with SQL/XML

    Our University have had for quite some time now a rather difficult situation with a very significant course handbook web site that creates HTML based on database XSL transformation of XML content generated with SQL/XML. The database is 10.2.0.2.0. The HTML is passed via a distributed database link to an Oracle Portal dynamic portlet for display. Some of the derived XML originates from XML Schema registered instance documents and some from relational storage.
    Let me explain. Occasionally after a period of operating (could be one week, sometimes even less) we will experience a problem whereby our derived XML content (just prior to PL/SQL database XSL transformation) will develop a parsing problem. Once this happens to one XSL transform of a course then subsequently it happens for every course viewed/transformed there-after.
    Recently I experienced the problem and then added the XMLNS argument to the extract function. That seemed to fix things and I thought I had it licked.
    Today we started to get the same problem again. The error reported was:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00242: invalid use of ampersand ('&') character (use &amp;)
    Error at line 1
    Now this might have been reasonable for one course. But every course reported the same problem there-after without fail. I managed to fix the issue but in a way that really doesn't seem to make sense. What I did was to alter the SQL/XML statement by adding in an extra XMLEMENT and then to recompile the function that returns an XMLTYPE based on the execution of the SQL statement. After compiling the function everything returned to normal.
    This doesn't seem to make sense.
    I am pretty desperate for help on this. I really don't know how to progress the solution. I don't get much joy from Oracle Support as our application covers too many high tech areas. This is really shaking confidence in our organization's use of Oracle technology.

    Hi Mark.
    We've isolated the problem a bit more now and there is a support SR (6089662.994). At this stage we are unable to reproduce - I am testing out an export though. The problem only occurs when a certain condition has been reached. Once that happens then extraneous characters are produced in the XMLTYPE feed returned by a function. We are not at all sure about how to make this condition occur. This doesn't just happen with one SQL/XML cursor - I've seen it happen with 3 different cursors. All are located in the same function that returns an XMLTYPE.
    We are convinced the problem lies with one or more SQL/XML cursors located in the same function. Once one of these cursors malfunctions it will produce XML that is not well formed OR on occasion has content omitted but is well formed (there often seem to be extraneous characters). When the XML content is not well formed then the parsing stage (dbms_xmlparser.parseclob(myparser, xml_clob)) of XSL transformation crashes. This error then propagates to the dynamic portlet in Oracle Portal thus removing the content on the page. This happens for every execution of the cursor while the condition manifests, the only difference between calls being bind variables.
    The interesting thing is that the error if left to itself will eventually stop. The cursor seems to right itself eventually. On the last occurrence, the problem commenced at 4.30am and went for 3.5 hrs and then seemed to right itself.

  • Very basic SQL/XML question

    I'm using the following environment:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    However, I don't think my environment is the issue.
    I'm trying to get output which looks like this from a simple table:
    <MAXDOMAIN action="S">
         <DOMAINID key="true">domainid_data</DOMAINID>
         <SYNONYMDOMAIN type="relationship" action="AU" >
              <VALUE key="true">value_data</VALUE>
              <MAXVALUE>maxvalue_data</MAXVALUE>
              <DESCRIPTION>description_data</DESCRIPTION>
              <DEFAULTS>defaults_data</DEFAULTS>
         </SYNONYMDOMAIN>
    </MAXDOMAIN>The table looks like this
    Name                           Null     Type          
    DOMAINID                       NOT NULL VARCHAR2(30)   
    DESCRIPTION                             VARCHAR2(50)   
    DOMAINTYPE                              VARCHAR2(5)    
    MAXTYPE                                 VARCHAR2(5)    
    LENGTH                                  VARCHAR2(5) The real question is how do I get an element with attributes to also have content.
    <DOMAINID key="true">domainid_data</DOMAINID>and
    <VALUE key="true">value_data</VALUE>I'm not sure if I'm syntactically challenged or just not using the correct tags.
    If I try to just generate the first two tags, forgetting the following nesting, I'm OK, as long as I don't try to assign attributes to the DOMAINID tag:
    SELECT  XMLELEMENT
    ("MAXDOMAIN",XMLATTRIBUTES('S' AS "action"),XMLELEMENT(NAME DOMAINID, "DOMAINID")
    AS "RESULT"
    FROM FAC_MAXDOMAIN;This works and is pretty trivial.
    <MAXDOMAIN action="S"><DOMAINID>AIRFLOWTYPE</DOMAINID></MAXDOMAIN>
    etc, etc...However, this:
    SELECT  XMLELEMENT
    ("MAXDOMAIN",XMLATTRIBUTES('S' AS "action"),XMLELEMENT(NAME DOMAINID, "DOMAINID",XMLATTRIBUTES('true' AS "key"))
    AS "RESULT"
    FROM FAC_MAXDOMAIN;Yields an ORA-00907: missing right parenthesis error.
    Any ideas? maybe a good primer on SQL/XML might be the best solution...
    TIA,
    Paolo

    Very nice for a first post in terms of data included and formatting.
    It took me a few minutes to see it, but the simple answer is you are putting the XMLAttributes in the wrong location. See the XMLElement spec at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions220.htm#SQLRF06168 that shows XMLAttributes comes between the identifier and value. So that means you should have written it as
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
    SQL> WITH FAC_MAXDOMAIN AS
      2  (SELECT 'domainid_data' domainid, 'dscr' description,
      3          'type' domaintype, '10' maxtype, '5' length
      4     FROM dual)
      5  -- Using WITH so didn't have to create your table locally
      6  SELECT  XMLELEMENT("MAXDOMAIN",
      7            XMLATTRIBUTES('S' AS "action"),
      8            XMLELEMENT(NAME DOMAINID, XMLATTRIBUTES('true' AS "key"), "DOMAINID")
      9          )
    10  AS "RESULT"
    11  FROM FAC_MAXDOMAIN;
    RESULT
    <MAXDOMAIN action="S"><DOMAINID key="true">domainid_data</DOMAINID></MAXDOMAIN>

  • PL/SQL Local Variable in Javascript

    I want to pass a PL/SQL local variable called F_NAME into the Javascript.
    The first question is, how do you display it inside of the Javascript?
    The second question is, how do you assign F_NAME to the field on the form?
    Please see the codes below. Please help, thank -Patty
    ==================================================================================
    declare
    f_name varchar2(15);
    begin
    select emp_first_name
    into f_name
    from emp_profile
    where e_mail_id = portal30.wwctx_api.get_user;
    htp.p('<script language="Javascript1.3">
    //==============================
    //This is the first question
    alert('||f_name||');
    //==============================
    var fname = new String("CDRH_TR_INSERT_MORE_RECORDS.MASTER_BLOCK.EMP_FIRST_NAME.01");
    //=========================================================================
    //This is the second question
    document.forms[0].elements[eval(fname)].value = "'||f_name||'";
    //==========================================================================
    </script>');
    END;

    Just like how you did it with the <script language="Javascript1.3"> . You use htp.p().
    So for example, htp.p('alert(''||f_name||'');
    OR
    htp.p('var fname = new String(''CDRH_TR_INSERT_MORE_RECORDS.MASTER_BLOCK.EMP_FIRST_NAME.01'');');

  • How to convert XML document to xml variable?

    Hi,
    I have taken an xml variable in my process and reading a xml document file. Can anyone tell me how can i convert this xml document to xml variable so that i can parse the xml variable.
    I am able to convert xml variable to xml document variable by using set value activity. But how do I perform reverse process.
    I want to perform this conversion because i want to keep xml data in document format on storage drive and then parse this xml data so that i can read the nodes.
    Any help will be appreciated..
    Regards
    Sunil

    we can use set value activity to reach these xml docs and assign it to xml variable.
    Then parsing of this xml can be browsed to find the nodes.
    Regards
    Sunil

  • Error while running PL/SQL XML Parser Samples

    every time try to run the PL/SQL XML Parser Sample program i get this error no file or directory, though the file and dir exists, i have the permissions setup as in readme.txt do i need to do any chnages to init.ora,
    pls advice
    Thanks,
    SQL> exec test
    begin test; end;
    ERROR at line 1:
    ORA-20100: Error occurred while parsing: No such file or directory
    ORA-06512: at "SCOTT.XMLPARSER", line 22
    ORA-06512: at "SCOTT.XMLPARSER", line 69
    ORA-06512: at "SCOTT.TEST", line 13
    ORA-06512: at line 1

    Which examples in particular? Thanks.

  • XML Fetch Error. The XML file assigned in the configuration.xml is either wrong or corrupted.

    1.Some web pages give "XML Fetch Error. The XML file assigned in the configuration.xml is either wrong or corrupted".
    2.Youtube gives, after pressing start button, message"An error occurred. Please try again later.
    Opening same youtube page with IE, there is no problems.
    3.Scrolling on Mozilla firefox pages works only with sidebar not with mouse wheel.
    Other user accounts on this computer doesn't have these problems.
    BR, Juha

    This can be caused by a recent Flash 11.3 update.
    See:
    *https://support.mozilla.org/kb/flash-113-doesnt-load-video-firefox

  • How do I create an undeclared namespace node with sql/xml?

    I have to interact with a .NET web service that is expecting to have an xml node with an undeclared namespace, i.e. <address xmlns=""> I figured that I could create this by using XMLATTRIBUTES ( '' AS "xmlns") but a null attribute will not be added to the attribute listing. This works fine for other xmlns entries that contain values. Without this undeclared namespace node, the web service reports an Internal SOAP failure message, so I have to include it. Do I have to resort to manually injecting this null attribute via DOM after I produce the xml? I'm using SQL/XML query generate the xml as a view which gives me the entire packet for this document/literal web service OTHER THAN this missing undeclared namespace element.
    Any tips/suggestions would be helpful! Thanks a bunch, and have a Happy Holiday Season.
    Eric

    You can use UTL_RAW package.
    First, convert string to raw with UTL_RAW.CAST_TO_RAW, then using UTL_RAW.CONVERT to convert raw to utf-8 and finally UTL_RAW.CAST_TO_VARCHAR to get utf-8 string.
    Regards

  • How to specify XML declaration in an XML Variable

    I had posted this question in the Flex Builder discussion,
    but I am not sure if that was the right board, so posting it again
    here:
    I need to set the XML declaration for my XML variable as
    follows:
    var employees:XML =
    <?xml version="1.0" encoding="utf-8"?>
    <employees>
    <employee ssn="123-123-1234">
    <name first="John" last="Doe"/>
    <address>
    <street>11 Main St.</street>
    <city>San Francisco</city>
    <state>CA</state>
    <zip>98765</zip>
    </address>
    </employee>
    <employee ssn="789-789-7890">
    <name first="Mary" last="Roe"/>
    <address>
    <street>99 Broad St.</street>
    <city>Newton</city>
    <state>MA</state>
    <zip>01234</zip>
    </address>
    </employee>
    </employees>;
    However, if I specify <?xml version="1.0"
    encoding="utf-8"?>, I get a design time and compile error. If I
    remove it it works fine. But the server to which I send this XML is
    expecting the declaration. How can I set the declaration?
    Any help or pointer is appreciated.

    I am not able to load the xml. Can anybody figure out the
    problem :
    I have used a LoadXML class :
    package {
    import flash.display.*;
    import flash.events.*;
    import flash.net.*;
    // Demonstrates the code required to load external XML
    public class LoadXML extends Sprite {
    // The property that will eventually contain the loaded XML
    private var novel:XML;
    // The object used to load the XML
    private var urlLoader:URLLoader;
    // Constructor
    public function LoadXML () {
    // Specify the location of the external XML
    var urlRequest:URLRequest = new URLRequest("novel.xml");
    // Create an object that can load external text data
    urlLoader = new URLLoader();
    // Register to be notified when the XML finishes loading
    urlLoader.addEventListener(Event.COMPLETE,
    completeListener);
    // Load the XML
    urlLoader.load(urlRequest);
    // Method invoked automatically when the XML finishes
    loading
    private function completeListener(e:Event):void {
    // The string containing the loaded XML is stored in the
    URLLoader
    // object's data property (urlLoader.data). To create a new
    XML
    // instance from that loaded string, we pass it to the XML
    constructor
    novel = new XML(urlLoader.data);
    trace(novel.toXMLString()); // Display the loaded XML, now
    converted
    // to an XML object
    And in main.mxml :
    myXml = new LoadXml ;
    trace ( myXml.novel ) ;
    The output is errenous

  • How to specify the XML Declaration for an XML variable

    I need to set the XML declaration for my XML variable as
    follows:
    var employees:XML =
    <?xml version="1.0" encoding="utf-8"?>
    <employees>
    <employee ssn="123-123-1234">
    <name first="John" last="Doe"/>
    <address>
    <street>11 Main St.</street>
    <city>San Francisco</city>
    <state>CA</state>
    <zip>98765</zip>
    </address>
    </employee>
    <employee ssn="789-789-7890">
    <name first="Mary" last="Roe"/>
    <address>
    <street>99 Broad St.</street>
    <city>Newton</city>
    <state>MA</state>
    <zip>01234</zip>
    </address>
    </employee>
    </employees>;
    However, if I specify <?xml version="1.0"
    encoding="utf-8"?>, I get a design time and compile error. If I
    remove it it works fine. But the server to which I send this XML is
    expecting the declaration. Can somebody help me with this?
    Thanks

    I work mostly with the Java versions of the parser so you'll have to make the translation to C++. As far as I know, you can't use the SAX API to access to the encoding.
    You need to use the DOM along with Oracle's extension to the basic DOM functionality. Oracle's package, oracle.xml.parser.v2 defines a class which implements the Document interface called XMLDocument. This class has a method, getEncoding(), which returns the encoding. You would use the method in getDocument() in the Parser base class inherited by DOMParser to retrive the XMLDocument.
    Jeff

Maybe you are looking for

  • Windows XP on my nLenovo 300 N 500

    I purchased the notebook from one of the dealers of lenovo in Burlington Canada, Wintronics Computers at the end of March 2009. The option with the notebook was XP pro upgradeable to Vista business. I took XP which is what they told me notebook comes

  • Is there an easy view of assigned Retention Tags in main view of Messages, e.g. a custom column?

    Hi, I have a requiement to have an easy/overall view of assigned Retention Policy tags against a list of messages in outlook 2010. I envisage that if there was a column in the main message list view, that showed the assigned tag against each message

  • Field fixed vendor for purchase requisition (component of project)

    Dear all, Could you please indicate us how we can automatic fill the field "Fixed Vendor" (FLIEF) in a purchase requisition comming from a component of an activity (of a project)? The field "Desired Vendor" (LIFNR) is filled automatic in the purchase

  • ABAP Object or function module?

    Hello all! I have to create a reusable routine. This routine should be select data from Z table for to get data with a parameter ID. I will pass a ID and expect result a internal table with some parameter values. So, my question is: What i use for to

  • Is this a current feature?

    This is me hoping I can exlain what I am looking for in the right way... Often I work with images that I am trying to edit. What I am wonder is if Photoshop CS4 has a feature to where you can select a certain area of the image/layer and make it a "no