Reg : xml version attribute in xml

Hi, van body tell me what is the significance of version attribute.
sometimes we use 1.0 , some times we use 4.0.
2 ) encoding attribute...? when we use UTF , ISO. and tell me among the
version , encoding which are mandatory, optional.
<?xml....?> --tag is optinal or not                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

The version attribute specifies the version of the XML standard you are using. 4.0 is not a valid version. You get 1.0 or (maybe if the parser supports it), 1.1. There is no XML version 4.0.
This value is not to be used for versioning your documents within your application context but is for parsers to determine which version of XML they must comply with when parsing your document.
See the prolog section in the XML specification:
http://www.w3.org/TR/xml/#sec-prolog-dtd
The encoding lets your parser know how the document's bytes were encoded so it can decode them properly. A simple google search for info on the encoding types, UTF-8, UTF-16, ISO-8859-1, etc. will tell you all you need to know.
Finally, the declaration <?xml ...?> is optional but recommended. Not only is it good practice, but it will ensure maximum portability of your documents (some parsers will reject the doc if you don't have it).

Similar Messages

  • A version attribute is required, but this  version of the Weblogic Server

    Hello,
    I am seeing below error in my weblogic server logs couple of times in a day. I have gone through couple of blogs and seems this error is related to weblogic patch.
    Could someone please help me understand what exactly this error represent to and what could be impact because of this. So far we dont see any issue in our development enviroment but want to fix this error.
    we are using WLS 10.3.5
    Error :-
    <Feb 7, 2013 1:03:03 PM EST> <Warning> <Munger> <BEA-2156203> <A version attribute was not found in element application in the deployment descriptor in
    Oracle/Middleware/user_projects/domains/osb_domain/sbgen/_ALSB_1360084990664.ear/META-INF/application.xml. A version attribute is required, but this
    version of the Weblogic Server will assume that the JEE5 is used. Future versions of the Weblogic Server will reject descriptors that do not specify the JEE
    version.>

    Yes. It is a bug!!!
    Apply the patch for bug 11720907.
    1. Download the patch
    Sign in in My Oracle Support. Choose Patches & Updates
    Type 11720907 in textfield 'Patche Name or Number'
    This is the path:
    Patch 11720907: SU Patch [2IE6]: <A VERSION ATTRIBUTE WAS NOT FOUND IN ELEMENT PERSISTENCE ..>
    2. Appy the path using Smart Update

  • What is the use of version attribute in jnlp tag??

    Hello,
    I want to know what is the use of version attribute in jnlp tag.
    For ex:
    <jnlp spec="6.0+" codebase="$$codebase" href="$$name" version="1.1">
    </jnlp>
    In the spec it explains:
    In the Jnlp tag:
    version = The version of the application being launched, as well as the version of the JNLP file itself.
    1. Is this version attribute would work as version attribute in jar tag. Ex: <jar href="application.jar" version="1.1"/> ?
    i.e. can we specify different jnlp's with the same name as we do for jar's with the help of version.xml.
    Any help is greatly appreciated.
    //Anjali

    Hi Reddy,
    If one Info Object depends on another info object we will make that dependent info object as a compounding attribute of main Info object.
    Eg: Storage Location – Plant
    In above eg there is no meaning of Storage Location without Plant. So, we will make storage location as compounding attribute of Plant.
    Regards,
    Sreehari.

  • Of the version attribute of a HelpSet tag

    Okay, I admit to being somewhat stumped here.
    Is there any way to access the value of the version attribute of the helpset element (or indeed, any of the version attributes of any of the various index, content & map files)?
    I'm trying to version an app's help content, and while these version attributes seem ready made for my purposes, without any way to access them from w/in the JH API, they're effectively useless (I don't want to have to resolve the known location of the .hs or .jhm file(s) just to parse them and get the version attribute(s) value(s) if possible, and I don't want to explore viable alternate versioning methods until I know why this one won't work).
    I'm having a really hard time understanding why this attrib. isn't/wasn't exposed. Maybe I'm just having a brainblock in seeing where/how it's exposed.
    All thoughts, comments, suggestions and questions are entertained, if not outright entertaining. Thanks in advance,
    -dSn

    See what happens when ya don't read the spec's backing the API's ya use? I haven't read that spec in over 2 years, and apparently it didn't jump out at me at that time as importand and/or major. Guess it all depends on what you're looking for when you read something.
    Thanks for the quick help; I'm off to implement my own personal version...erm...vision of versioning...um...anyway, back to it.
    Thanks again!
    -dSn

  • XML version attribute

    I am writing java through lotus notes. In it I go out and hit a web service and return the xml data. Once in the xml I use a transformer but I get the following error:
    javax.xml.transform.TransformerException: stylesheet requires attribute: version
    The code that I have does work when I use my xml as a file instead of in from the web service. I can not find anything that makes tis work. Before I had written this in lotusscript and used the ls2j connector and it worked fine (until the JVM would blow up) so we are dropping the connector and writing it all in java. Here is my code to work with the transformer....
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import org.apache.xalan.processor.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.dom.*;
    import org.w3c.dom.*;
    * This class allows you to apply an XSL style sheet against an XML string from within the Lotus Notes environment, without having to place an XSL file on the file system or use a Java Agent.
    * Xalan-Java 2.5.0 is required.  It can be downloaded from http://xml.apache.org/xalan-j/ .
    * The JavaUserClasses variable in the Lotus Notes notes.ini file must reflect the jar files from Xalan.
    public class clsNotesXSLTNTS extends Object
        private String strXml;
        private String strXsl;
        private String strXslUrl;
          * Empty Constructor.
          * @see java.lang.Object#Object()
        public clsNotesXSLTNTS     ()
             super();
          * This method will return the resultant transformation.
          * A url is the default source for the xsl file which is set using setXslUrl().  If it is not found a String input is assumed which is set using setXsl().
          * If a xsl url or a xsl String is not provided, null will be returned.
          * @return String
        public String process() {
            try
                   StringReader srXSL;
                   StringReader srXML = new StringReader(strXml);
                   StringWriter sw = new StringWriter();
                      StreamSource ssXSL;
                 TransformerFactory factory = null;
                Transformer transformer = null;
                 // determine the source xsl type
                 if (this.strXslUrl != null) {
                      ssXSL = new StreamSource(this.strXslUrl);
                 else if (this.strXsl != null) {
                      srXSL = new StringReader(strXsl);
                      ssXSL = new StreamSource(srXSL);
                 else {
                      return null;
                      // set the sax driver
    //                  System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
                 try {
                      // create a new factory
              transformer = factory.newTransformer(ssXSL);
                 catch(Exception e) {
                      System.out.println("Unable to create Transformer Factory: " + e.getMessage());
                 try {           
                     // create a new transformer
                        transformer = factory.newTransformer(ssXSL);
                 catch(Exception e) {
                      System.out.println("Unable to create Transformer:" + e.getMessage());
                // get the source xml
                StreamSource xmlsource = new StreamSource(srXML);
                // create a stream for the result of the transformation
                StreamResult output = new StreamResult(sw);
                // transform the input xml using the input xsl
                transformer.transform(xmlsource, output);
                   // return the resultant transformation
                   return sw.toString();
    //          return strXml;
            catch(Exception e)
                 e.printStackTrace();
    //             System.out.println(strXml);
                return null;
          * Gets the XML string that is to be transformed.
          * @return String
        public String getXml() {
            return strXml;
          * Sets the XML string that is to be transformed.
          * @param pstrXml The XML string.
        public void setXml(String pstrXml) {
            this.strXml = pstrXml;
          * Gets the XSL string that is used to transform the XML string.
          * @return String
         public String getXsl() {
              return strXsl;
          * Sets the XSL string that is used to transform the XML string.
          * @param pstrXsl The XSL string.
         public void setXsl(String pstrXsl) {
              this.strXsl = pstrXsl;
          * Gets the URL of the XSL file that is used to transform the XML string.
          * @return String
         public String getXslUrl() {
              return strXslUrl;
          * Sets the URL of hte XSL file that is used to transform the XML string.
          * @param pstrXslUrl The URL of the XSL file.
         public void setXslUrl(String strXslUrl) {
              this.strXslUrl = strXslUrl;
    }to set the XML I use the following code:
              clsNotesXSLTNTS  JXSLT;
              JXSLT = new clsNotesXSLTNTS();
              JXSLT.setXslUrl(strXSLPath);
              JXSLT.setXml(XMLData);
              XMLData = JXSLT.process();where the XMLData is returned from the web services, here is an example file that I printed out to the browser and saved. If I use this file it works, but if I do not put it out to the file system then it does not work.
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <getInfoByPartialNameSpmpy004Response xmlns="http://tempuri.org/"><getInfoByPartialNameSpmpy004Result>
    <params xmlns="http://tempuri.org/"><baseTarget>MainFrame</baseTarget><onLoadFunction>PostLoad()</onLoadFunction><formName>InquirySelection</formName><filePath>C:/notes/data/aptestCOPY.nsf</filePath><isUser>1</isUser><isNewForm>0</isNewForm><searchVendors>1</searchVendors><vendorSearchString>SHER</vendorSearchString><printVendorSelection>1</printVendorSelection><tableBGColor>#FFFEAD</tableBGColor><THClass>normal</THClass><TDClass>normal</TDClass></params><anyType xsi:type="clsVendorInfo"><blnFound>true</blnFound><strNumber>4603232                                                     </strNumber><strName>HOTEL Name       </strName><strAddr1>18TH AT Smoothie ST                       </strAddr1><strAddr2>                                        </strAddr2><strCity>Somewhere             </strCity><strState>PA </strState></anyType></getInfoByPartialNameSpmpy004Result></getInfoByPartialNameSpmpy004Response></soap:Body></soap:Envelope>This file was generated by calling the web service with the program and then printing it out to the browser and cut and paste. Anyone with any thoughts ????
    Thanks in advance

    I left off the first part of my XSL...
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ap="http://tempuri.org/" version = "1.0">
         <xsl:strip-space elements="*" />
         <xsl:output method="html" encoding="utf-8"/>

  • Reg: XML Gateway Error while posting invoice (PROCESS_INVOICE_002 )

    I'm trying to post the PROCESS_INVOICE_002 to Oracle 11i XML gateway which is supposed to route to the mentioned trading partner.
    When I observed the status through Workflow Admin web App - > Transaction Monitor the message has reached the INBOUND Queue but it is not able to route it/ process it ... and goes to error state with
    The Standard:OAG, Transaction Type:INVOICE , Transaction SubType:PROCESS and Location Code Bigmart is not enabled in the XML Gateway Server. Pls check your Setup.
    Then I had corrected the setup with the proper TP configuration.
    Now I'm getting a different error.
    Kindly give me some inputs regarding this.
    Now it is giving the below mentioned error. Here is the Process Summary:
    Document ID blrgislin15:26ae9b47:11a9c4ae5b9:46b1
    Internal Control Number 1656
    External Transaction Type INVOICE
    External Transaction Subtype PROCESS
    Party ID
    Party Type
    Trading Partner Name N/A
    Site Name N/A
    Processing Date 19-Jun-2008 16:41:15
    Processing Status Error
    Processing Message ORA-06502: PL/SQL: numeric or value error: character string buffer too small - ECX_INBOUND_TRIG.WRAP_VALIDATE_MESSAGE
    Processing Logfile
    The XML Invoice I'm posting is :
    <PROCESS_INVOICE_002>
         <CNTROLAREA>
              <BSR>
                   <VERB value="PROCESS">PROCESS</VERB>
                   <NOUN value="INVOICE">INVOICE</NOUN>
                   <REVISION value="002">002</REVISION>
              </BSR>
              <SENDER>
                   <LOGICALID>BigMart</LOGICALID>
                   <COMPONENT>INVOICE</COMPONENT>
                   <TASK>PROCESS</TASK>
                   <REFERENCEID></REFERENCEID>
                   <CONFIRMATION>0</CONFIRMATION>
                   <LANGUAGE>ENG</LANGUAGE>
                   <CODEPAGE>UTF8</CODEPAGE>
                   <AUTHID>APPS</AUTHID>
              </SENDER>
              <DATETIME qualifier="CREATION">
                   <YEAR>2003</YEAR>
                   <MONTH>09</MONTH>
                   <DAY>22</DAY>
                   <HOUR>07</HOUR>
                   <MINUTE>30</MINUTE>
                   <SECOND>18</SECOND>
                   <SUBSECOND>0000</SUBSECOND>
                   <TIMEZONE>-0500</TIMEZONE>
              </DATETIME>
         </CNTROLAREA>
         <DATAAREA>
              <PROCESS_INVOICE>
                   <INVHEADER>
                        <AMOUNT qualifier="DOCUMENT" type="T">
                             <VALUE>6300</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <CURRENCY>USD</CURRENCY>
                             <DRCR>D</DRCR>
                        </AMOUNT>
                        <DATETIME qualifier="DOCUMENT">
                             <YEAR>2003</YEAR>
                             <MONTH>09</MONTH>
                             <DAY>23</DAY>
                             <HOUR>01</HOUR>
                             <MINUTE>00</MINUTE>
                             <SECOND>00</SECOND>
                             <SUBSECOND>0000</SUBSECOND>
                             <TIMEZONE>-0500</TIMEZONE>
                        </DATETIME>
                        <DOCUMENTID>10000</DOCUMENTID>
                        <DESCRIPTN>INVOICES FROM STAPLES</DESCRIPTN>
                        <REASONCODE>INVOICE</REASONCODE>
                        <PARTNER>
                             <NAME index="1">STAPLES-LA</NAME>
                             <PARTNRID>STAPLES-LA</PARTNRID>
                             <PARTNRTYPE>SUPPLIER</PARTNRTYPE>
                             <ADDRESS>
                                  <ADDRLINE index="1">22355 WEST ELEVEN MILE ROAD</ADDRLINE>
                                  <CITY>LOS ANGELES</CITY>
                                  <COUNTRY>US</COUNTRY>
                                  <POSTALCODE>48034</POSTALCODE>
                                  <STATEPROVN>CA</STATEPROVN>
                             </ADDRESS>
                             <CONTACT>
                                  <NAME index="1">JOHN STAPLES</NAME>
                                  <CONTCTTYPE>ACCOUNTING</CONTCTTYPE>
                                  <EMAIL>[email protected]</EMAIL>
                             </CONTACT>
                        </PARTNER>
                   </INVHEADER>
                   <INVLINE>
                        <AMOUNT qualifier="EXTENDED" type="T">
                             <VALUE>6300</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <CURRENCY>USD</CURRENCY>
                             <DRCR>D</DRCR>
                        </AMOUNT>
                        <AMOUNT qualifier="TOTAL" type="T">
                             <VALUE>6300</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <CURRENCY>USD</CURRENCY>
                             <DRCR>D</DRCR>
                        </AMOUNT>
                        <OPERAMT qualifier="UNIT" type="T">
                             <VALUE>6300</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <CURRENCY>USD</CURRENCY>
                             <UOMVALUE>1</UOMVALUE>
                             <UOMNUMDEC>0</UOMNUMDEC>
                             <UOM>EA</UOM>
                        </OPERAMT>
                        <QUANTITY qualifier="ITEM">
                             <VALUE>100</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <UOM>EA</UOM>
                        </QUANTITY>
                        <LINENUM>1</LINENUM>
                        <DESCRIPTN>1st Invoie Line</DESCRIPTN>
                   </INVLINE>
              </PROCESS_INVOICE>
         </DATAAREA>
    </PROCESS_INVOICE_002>

    Hi, Due to some other problem with my setup, I had to reinstall E-Biz, and again did all the configuration freshly and tried posting the same xml but for the current customer configuration. It went successfully. Here is the xml I'have posted. You can try configuring your transactions and Trading Partner as given in the XML gateway User Guide, which is available as part of the documentation.
    <?xml version="1.0"?>
    <!DOCTYPE PROCESS_INVOICE_002 SYSTEM "171_process_invoice_002.dtd">
    <PROCESS_INVOICE_002>
         <CNTROLAREA>
              <BSR>
                   <VERB value="PROCESS">PROCESS</VERB>
                   <NOUN value="INVOICE">INVOICE</NOUN>
                   <REVISION value="002">002</REVISION>
              </BSR>
              <SENDER>
                   <LOGICALID>Bigmart</LOGICALID>
                   <COMPONENT>INVOICE</COMPONENT>
                   <TASK>PROCESS</TASK>
                   <REFERENCEID></REFERENCEID>
                   <CONFIRMATION>0</CONFIRMATION>
                   <LANGUAGE>ENG</LANGUAGE>
                   <CODEPAGE>UTF8</CODEPAGE>
                   <AUTHID>APPS</AUTHID>
              </SENDER>
              <DATETIME qualifier="CREATION">
                   <YEAR>2008</YEAR>
                   <MONTH>07</MONTH>
                   <DAY>08</DAY>
                   <HOUR>07</HOUR>
                   <MINUTE>30</MINUTE>
                   <SECOND>18</SECOND>
                   <SUBSECOND>0000</SUBSECOND>
                   <TIMEZONE>-0500</TIMEZONE>
              </DATETIME>
         </CNTROLAREA>
         <DATAAREA>
              <PROCESS_INVOICE>
                   <INVHEADER>
                        <AMOUNT qualifier="DOCUMENT" type="T">
                             <VALUE>6300</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <CURRENCY>USD</CURRENCY>
                             <DRCR>D</DRCR>
                        </AMOUNT>
                        <DATETIME qualifier="DOCUMENT">
                             <YEAR>2008</YEAR>
                             <MONTH>07</MONTH>
                             <DAY>08</DAY>
                             <HOUR>01</HOUR>
                             <MINUTE>00</MINUTE>
                             <SECOND>00</SECOND>
                             <SUBSECOND>0000</SUBSECOND>
                             <TIMEZONE>-0500</TIMEZONE>
                        </DATETIME>
                        <DOCUMENTID>10001</DOCUMENTID>
                        <DESCRIPTN>INVOICES FROM STAPLES</DESCRIPTN>
                        <REASONCODE>INVOICE</REASONCODE>
                        <PARTNER>
                             <NAME index="1">BigMart</NAME>
                             <PARTNRID>BigMart</PARTNRID>
                             <PARTNRTYPE>Customer</PARTNRTYPE>
                             <ADDRESS>
                                  <ADDRLINE index="1">100 Main Street Bentonville</ADDRLINE>
                                  <CITY>Arizona</CITY>
                                  <COUNTRY>US</COUNTRY>
                                  <POSTALCODE>38019</POSTALCODE>
                                  <STATEPROVN>AR</STATEPROVN>
                             </ADDRESS>
                             <CONTACT>
                                  <NAME index="1">JOHN STAPLES</NAME>
                                  <CONTCTTYPE>ACCOUNTING</CONTCTTYPE>
                                  <EMAIL>[email protected]</EMAIL>
                             </CONTACT>
                        </PARTNER>
                   </INVHEADER>
                   <INVLINE>
                        <AMOUNT qualifier="EXTENDED" type="T">
                             <VALUE>6300</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <CURRENCY>USD</CURRENCY>
                             <DRCR>D</DRCR>
                        </AMOUNT>
                        <AMOUNT qualifier="TOTAL" type="T">
                             <VALUE>6300</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <CURRENCY>USD</CURRENCY>
                             <DRCR>D</DRCR>
                        </AMOUNT>
                        <OPERAMT qualifier="UNIT" type="T">
                             <VALUE>6300</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <CURRENCY>USD</CURRENCY>
                             <UOMVALUE>1</UOMVALUE>
                             <UOMNUMDEC>0</UOMNUMDEC>
                             <UOM>EA</UOM>
                        </OPERAMT>
                        <QUANTITY qualifier="ITEM">
                             <VALUE>100</VALUE>
                             <NUMOFDEC>2</NUMOFDEC>
                             <SIGN>+</SIGN>
                             <UOM>EA</UOM>
                        </QUANTITY>
                        <LINENUM>1</LINENUM>
                        <DESCRIPTN>1st Invoie Line</DESCRIPTN>
                   </INVLINE>
              </PROCESS_INVOICE>
         </DATAAREA>
    </PROCESS_INVOICE_002>

  • Reg XML generation from java objects using SAX 2.0

    i'm using java 1.6 and i've imported following class to generate XML from java objects
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    the following class has been imple her to create a Xml file and tag elements ,
    OutputFormat of = new OutputFormat("XML", "iso-8859-1", true);
    XMLSerializer serializer = new XMLSerializer(fos, of);
    ContentHandler hd = serializer.asContentHandler();
    hd.startDocument();
    everything works fine but i'm getting warrnin reg the serializer and outputformat
    warring is:
    com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release
    com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release
    HOW CAN I AVOID DS WARRING PLZ HELP REG DS
    thanks ,
    with regards,
    Rajesh.S

    I've been having the same problem. Here is what i found:
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476630]
    Hope that helps (or at least helps you feel better).

  • Reg: XML & Autotrace -

    Hi Experts,
    I was just experimenting playing with some XML functions by setting AUTOTRACE ON and everything was fine until I did AUTOTRACE OFF .
    Am I hitting any bug or just unaware of some important concept?
    Please check this:
    SQL> select XMLElement("name",'ranit') from dual;
    XMLELEMENT("NAME",'RANIT')
    <name>ranit</name>
    Execution Plan
    Plan hash value: 1388734953
    | Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
    |   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
              3  consistent gets
              0  physical reads
              0  redo size
            872  bytes sent via SQL*Net to client
            411  bytes received via SQL*Net from client
              3  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> set autotrace off
    SQL> select XMLElement("name",'ranit') from dual;
    ERROR:
    OCI-21522: attempted to use an invalid connection in OCI (object mode only)
    SQL> select XMLElement("name",'ranit') from dual;
    ERROR:
    OCI-21522: attempted to use an invalid connection in OCI (object mode only)
    SQL> select XMLElement("name",'ranitx') from dual;
    ERROR:
    OCI-21522: attempted to use an invalid connection in OCI (object mode only)
    SQL> set autotrace on
    SQL> select XMLElement("name",'ranitx') from dual;
    XMLELEMENT("NAME",'RANITX')
    <name>ranitx</name>
    Execution Plan
    Plan hash value: 1388734953
    | Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
    |   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
    Statistics
              0  recursive calls
              0  db block gets
              6  consistent gets
              0  physical reads
              0  redo size
           1253  bytes sent via SQL*Net to client
            491  bytes received via SQL*Net from client
              4  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>I'm quite confused with this behavior. Can anybody please explain me this?
    DB Version:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - ProductionThanks,
    Ranit

    Seems ok in my version:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> select XMLElement("name",'ranit') from dual;
    XMLELEMENT("NAME",'RANIT')
    <name>ranit</name>
    SQL> set autotrace on
    SQL> select XMLElement("name",'ranit') from dual;
    XMLELEMENT("NAME",'RANIT')
    <name>ranit</name>
    Execution Plan
    Plan hash value: 1388734953
    | Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
    |   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
    Statistics
              0  recursive calls
              0  db block gets
              3  consistent gets
              0  physical reads
              0  redo size
            883  bytes sent via SQL*Net to client
            420  bytes received via SQL*Net from client
              3  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> set autotrace off
    SQL> select XMLElement("name",'ranit') from dual;
    XMLELEMENT("NAME",'RANIT')
    <name>ranit</name>
    SQL> set autotrace on
    SQL> select XMLElement("name",'ranit') from dual;
    XMLELEMENT("NAME",'RANIT')
    <name>ranit</name>
    Execution Plan
    Plan hash value: 1388734953
    | Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
    |   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
    Statistics
              0  recursive calls
              0  db block gets
              3  consistent gets
              0  physical reads
              0  redo size
            883  bytes sent via SQL*Net to client
            420  bytes received via SQL*Net from client
              3  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> set autotrace off
    SQL> select XMLElement("name",'ranit') from dual;
    XMLELEMENT("NAME",'RANIT')
    <name>ranit</name>

  • Reg: XML PUBLISHER HELP

    Hi all,
    I am building report using xml publisher. Problem i facing was ,
    1. I created the template in RTF and attached to data definition
    for eg: my rtf is
    sno item quantity price ( I created this field in table structure and mapped to xml data)
    Total Price ( this also i am getting from data definition)
    The below is sample constant sentence for my client and typed just below Total Price ( field i mentioned above)
    Inspected By Approved By
    1)
    ________________________________ 1)________________________________ Store Incharge : ______________________
    2)
    ________________________________ 2) ________________________________ Received : _______________________
    3)
    ________________________________ 3 ________________________________ Prepared By : _______________________
    NOTE : ABOVE MENTIONED LINES ARE CONSTANT ONE.
    2. When i ran the report, if my data definition return 5 lines means , i am getting PDF output Correctly in single page (1st page)
    3) If my data definition returns lines more than 8 lines means, I am getting PDF output with Table structure values with item, in 1 st page and Constant sentence in 2nd page of PDF
    4) If my data definition returns lines between 5 and 8 means, I am getting PDf output with table structure values with item and some of Constant sentence of my client in 1 st page and few of the constanst sentence in 2nd page.
    Actually my need
    Even if the data definitions exceeds more than 5 lines the constant sentence should be placed either in the first page or in the next page based on the no. of lines in the data definition.
    How to resolve this... any approach most welcome. Wat changes i have to make.

    Hi Shruti,
    You can start with the BI publisher page on OTN http://www.oracle.com/technology/products/xml-publisher/index.html.
    Check out the tutorials (Oracle by Example). There's lot of good information out there. Check out the BI publisher guide here:http://www.oracle.com/technology/products/xml-publisher/xmlpdocs.html
    Search the forum or post questions about any specific questions you may have about formatting numbers and dates.
    Hope this helps.
    Thanks!

  • Reg XML to Plain Conversion using B2B add on

    Hi All,
    This is an outbound scenario where the  message is sent to AS2 receiver channel and the output is Plain file. I have added all the module parameters
    and the content type as application/plain. While testing I am facing the error,
    Exception caught by adapter framework: XML-Parser error occured while parsing: Cannot initialize XML to plain handlerCan not find a matching configuration for sender party "", service , receiver party ,service , namespace , action  in table B2B_PLA_CTRL_IF.
    Can anyone help me on this issue.
    Cheers,
    Neethu

    Hi Neethu,
    Did you import the content? See How to install the new B2B add-on , see step 5.1
    You need to do this for the message type you want to exchange ((EDI, ansi X.12, ...).
    Also, please do step 5.2. I guess this is not the case.
    Kind regards,
    Dimitri

  • Reg: xml file

    hi,
    how to extract xml file to database.....
    what are different methods in it...how useful it is in real time scenario?
    what is the adv in it...
    awaiting for ur kindly reply..
    cheers,

    Lots of examples in the official documentation too : Generating XML Data from the Database

  • Reg: Xml Reports

    1)How to develop xml report without rdf?

    Try this:
    PROCEDURE write_out(PR_message IN VARCHAR2) IS
    -- =====================================================================
    -- P R O C E D U R E write_out
    -- =====================================================================
    -- Description : write to fnd_file.output file
    -- =====================================================================
    -- I N P U T
    -- =====================================================================
    -- Name Description
    -- =====================================================================
    -- PR_message message to be writen
    -- =====================================================================
    BEGIN
    fnd_file.put_line(fnd_file.output,
    PR_message);
    END write_out;
    PROCEDURE Generate_Xml_output(PR_return_code OUT NUMBER,
    PR_return_message OUT VARCHAR2) IS
    -- =====================================================================
    -- P R O C E D U R E Generate_Xml_output
    -- =====================================================================
    -- Description : Generate XML and split it into multiple Varchar
    -- of 32767 characters each maximum length.
    -- =====================================================================
    -- I N P U T
    -- =====================================================================
    -- Name Description
    -- =====================================================================
    -- PR_return_code Return code (0 if success)
    -- PR_return_message Return message (null if success);
    -- =====================================================================
    l_doc CLOB;
    l_len NUMBER;
    l_xmlstr VARCHAR2(32767);
    l_offset NUMBER := 25000;
    l_retrieved NUMBER := 0;
    l_endTag VARCHAR2(10);
    l_exit BOOLEAN;
    l_module VARCHAR2(50) := 'Generate_Xml_output';
    BEGIN
    BEGIN
    SELECT dbms_xmlgen.getxml('SELECT * FROM XLA_AE_LINES WHERE ......')
    INTO l_doc
    FROM dual;
    PR_return_code := 0;
    EXCEPTION
    WHEN OTHERS THEN
    PR_return_code := 2;
    PR_return_message := 'ERROR: DBMS Cannot generate xml - ' || SQLERRM;
    END;
    L_len := dbms_lob.getlength(L_doc);
    write_log('L_len: ' || L_len,
    l_module);
    LOOP
    EXIT WHEN L_len = L_retrieved;
    IF (L_len - L_retrieved) < L_offset THEN
    write_log('1.0 IF (L_len - L_retrieved) < L_offset ' || L_len, l_module);
    SELECT SUBSTR(L_doc,
    L_retrieved + 1)
    INTO L_xmlstr
    FROM dual;
    L_retrieved := L_len;
    write_out(L_xmlstr);
    ELSE
    write_log('1.1 IF (L_len - L_retrieved) > L_offset ' || L_len, l_module);
    L_offset := 25000;
    L_exit := FALSE;
    LOOP
    EXIT WHEN L_exit;
    SELECT SUBSTR(L_doc,
    L_retrieved + 1,
    L_offset)
    INTO L_xmlstr
    FROM DUAL;
    L_endTag := SUBSTR(L_xmlstr,
    -2);
    IF L_endTag != '/>' THEN
    L_offset := L_offset + 1;
    ELSE
    L_exit := TRUE;
    END IF;
    END LOOP;
    L_retrieved := L_retrieved + L_offset;
    write_out(L_xmlstr);
    END IF;
    END LOOP;
    PR_return_code := 0;
    PR_return_message := NULL;
    EXCEPTION
    WHEN OTHERS THEN
    PR_return_code := 0;
    PR_return_message := 'Error in Generate_Xml_output: ' || SQLERRM;
    END Generate_Xml_output;

  • Reg:xml upload to appl server

    Hi ,
    I had declared an internal table which contains a field type hexa decimal.
    TYPES: BEGIN OF XML_LINE,
      DATA(256) TYPE X,
    END OF XML_LINE.
    now while uploading the xml data to appl sever the last character of all the lines are missing .
    when downloading to presentation server  and OS IS windows .IT is downloading the whole xml document.
    but when downloading to presentation server  and OS IS UNIX .IT is NOT downloading the whole xml document.the truncated part is not downloaded.
    Thanks & Regards,
    Satish

    Hi,
           If you have the XML file on application server,
    you can use OPEN DATASET statement.
    eg.
    DATA: line TYPE string,
    file(20) TYPE C value '/usr/test.dat'.
    OPEN DATASET file IN TEXT MODE ENCODING DEFAULT FOR INPUT.
    DO.
    READ DATASET file INTO line.
    IF sy-subrc <> 0.
    EXIT.
    ENDIF.
    WRITE: / line.
    ENDDO.
    CLOSE DATASET file.
    <b>Reward points</b>
    Regards

  • Reg: XML PUBLISHER

    Hi all,
    How to add multiple template for one concurrent program in xml publisher..
    Thanks

    Hi,
    Refer to "Oracle XML Publisher" guide available at:
    Applications Releases 11i and 12
    http://www.oracle.com/technology/documentation/applications.html
    Regards,
    Hussein

  • Reg : XML generation -

    Hi Experts,
    I've a query which generates a XML but it is not working for a specific requirement.
    SELECT XMLSERIALIZE (
              DOCUMENT XMLELEMENT (
                          "Feed", XMLAttributes('http://www.abc.com/check/2.1' as "xmlns"),
                          XMLAGG (
                             XMLELEMENT (
                                "Interaction",
                                XMLFOREST (
                                   "Email" AS "EmailAddress",
                                   "Locale" AS "Locale",
                                   "First Name" AS "UserName",
                                   "User Id" AS "UserID",
                                   "Interaction Date" AS "TransactionDate",
                                   XMLFOREST (
                                      XMLFOREST (
                                         "Product ID" AS "ExternalId",
                                         "Product" AS "Name",
                                         "Product Image URL" AS "ImageUrl",
                                         "Price" AS "Price") AS "Product") AS "Products")))))
            --INTO v_xml_doc
        FROM xx;gives
    <Interaction>
        <EmailAddress>[email protected]</EmailAddress>
        <Locale>en_US</Locale>
        <UserName>User</UserName>
        <UserID>SomeID</UserID>
        <TransactionDate>2012-01-01T00:00:00.000</TransactionDate>
        <Products>
            <Product>
                <ExternalId>ExternalID-01</ExternalId>
                <Name>Product 01</Name>
                <ImageUrl>http://www.company.com/product-01/image.jpg</ImageUrl>
            </Product>
        </Products>
    </Interaction>
    <Interaction>
        <EmailAddress>[email protected]</EmailAddress>
        <Locale>en_US</Locale>
        <UserName>User</UserName>
        <UserID>SomeID</UserID>
        <TransactionDate>2012-01-01T00:00:00.000</TransactionDate>
        <Products>
            <Product>
                <ExternalId>ExternalID-02</ExternalId>
                <Name>Product 02</Name>
                <ImageUrl>http://www.company.com/product-02/image.jpg</ImageUrl>
            </Product>
        </Products>
    </Interaction>But, i want if they belong to same User (Id), then generate only 1 <Interaction> tag :
    something like this :
    <Interaction>
        <EmailAddress>[email protected]</EmailAddress>
        <Locale>en_US</Locale>
        <UserName>User</UserName>
        <UserID>SomeID</UserID>
        <TransactionDate>2012-01-01T00:00:00.000</TransactionDate>
        <Products>
            <Product> --"node 1"
                <ExternalId>ExternalID-01</ExternalId>
                <Name>Product 01</Name>
                <ImageUrl>http://www.company.com/product-01/image.jpg</ImageUrl>
            </Product>
            <Product> --"node 2"
                <ExternalId>ExternalID-02</ExternalId>
                <Name>Product 02</Name>
                <ImageUrl>http://www.company.com/product-02/image.jpg</ImageUrl>
            </Product>
        </Products>
    </Interaction>Any idea?
    Help is highly appreciated.
    Ranit B.

    Group by common columns :
    (not tested)
    SELECT XMLSERIALIZE (
              DOCUMENT XMLELEMENT (
                          "Feed", XMLAttributes('http://www.abc.com/check/2.1' as "xmlns"),
                          XMLAGG (
                             XMLELEMENT (
                                "Interaction",
                                XMLFOREST (
                                   "Email" AS "EmailAddress",
                                   "Locale" AS "Locale",
                                   "First Name" AS "UserName",
                                   "User Id" AS "UserID",
                                   "Interaction Date" AS "TransactionDate"
                                 XMLELEMENT ("Products",
                                   XMLAGG(
                                    XMLELEMENT ("Product",
                                      XMLFOREST(
                                       "Product ID" AS "ExternalId",
                                       "Product" AS "Name",
                                       "Product Image URL" AS "ImageUrl",
                                       "Price" AS "Price"
            --INTO v_xml_doc
    FROM xx
    GROUP BY "User Id", "Email", "Locale", "First Name", "Interaction Date" ;

Maybe you are looking for

  • How many times can you download Lightroom4?

    I just purchased Lightroom 4 and have multiple devises I want to install it on. Is there a max or unlimited?

  • Data Source Creation in R/3

    Hi all.    I need to extract the data from multiple tables from R/3. For that I am creating a datasource using RSO2. In this scenario do I need choose extraction from  view ( IN rso2)& create a view combining these tables & use this in data source cr

  • Converting desktop app to mobile app

    hi i have developed a simple java desktop app for making currency conversions, now i want this to work on my mobile, what are the steps to take to convert it, or do I have to start from scratch? thanks

  • Filename with FTP adapter

    Hi, Is there any one who knows how to specify the filename dynamicly in the File Adapter?. I can only see that i can specify the filename as a constant and just add a time stamp. But the case is that i need to specify the name dynamicly using some da

  • Credit notes from Warranty Claims - COPA documents generation

    We are using warranty claim procesing component under Customer Service Module ( Tcode - OWTY) . Though we are able to post accounting documents , Costing based  COPA documents are not getting generated though we were able to generate account based CO