Question regarding creation of xml-elements with numerical values

When i create xml-documents from xml stored in the database (xmltype table based on an xml-schema), i find that numerical values which were stored as 0.395 (with the "." as the decimal separator) are retrieved as .395.
Is it possible to apply a format mask so that the numerical value is retrieved as 0.395?
thanks, Bart
N.b. Note that i select a complete xml-fragment. So my problem seems related to the storage or retreival of 'schredded' XML. I do not use SQL/XML-functions with relational data, in which case i know how to apply a format mask.

I don't use XSLT, i just query the XML-documents stored in an XMLType column with a simple SQL-statement.
I have posted a simple example over here Re: Is it possible to influence the creation of empty elements?

Similar Messages

  • Regarding creation of node element

    Hi
    i hav a doubt regarding creation of node element. u can create new node element using method create(cn)Element available either directly from wdContext or from wdContext.node(cn) where cn is any context node.
    can any one plz explain me what's the difference between two.
    does it has any thing to with node being singelton or non-singelton?
    also can anyone explain me the difference between add and bind method.
    thanks.

    hi
    good
    Data Binding Methods
    If a property can, or must be bound to the context, the respective bind and bound methods are available.
    ●     The bind methods bind the value of a property to the context element specified by the path.
    The name of the method is created according to the following pattern:
    BIND_<runtime name of the property>.
    Example: table, property: design, method: BIND_DESIGN.
    &#9679;     The bound methods return the path of the context element to which a property is bound and return NULL if no binding exists.
    The name of the method is created according to the following pattern:
    BOUND_<runtime name of the property>.
    Example: table, property: design, method: BOUND_DESIGN.
    ADD METHOD->
    Two add methods that add an element.
    &#9675;     If only the element is transferred as parameter, then the element is added at the and of a list
    &#9675;     If an index is transferred as well, then this element is transferred at the specified index position.
    http://help.sap.com/saphelp_erp2005/helpdata/en/66/18b44145143831e10000000a155106/content.htm
    thanks
    mrutyun^

  • Create XML-element with different prefixes

    Hello,
    In Infopath 2010 I want to generate a XML-element with C#.
    I've got a XML-structure with following elements:
    /my:meineFelder/my:gruppe1/my:gruppe2/my:unter/my:art
    /my:meineFelder/my:gruppe1/my:gruppe2/ns1:FW1/MANDT
    To fill the field "art" I use this code:
    string myNamespace = NamespaceManager.LookupNamespace("my");
    writer.WriteStartElement("gruppe2", myNamespace);
      writer.WriteStartElement("unter", myNamespace);
        writer.WriteElementString("art", myNamespace, "lets go");
      writer.WriteEndElement();
    writer.WriteEndElement();
    writer.Close();
    This works very well.
    Problem: the code above do not work for the second field MANDT. Error: Error during Schema Validation.
    /my:meineFelder/my:gruppe1/my:gruppe2/ns1:FW1/MANDT
    I tried this:
     writer.WriteStartElement("ns1", "FW1", myNamespace);
            writer.WriteElementString("ns1", "MANDT", myNamespace, "100");
            writer.WriteEndElement();
    As you can see, the problem is ns1:FW1. How to fix it?
    Thank you very much!
    Regards,
    spadmin

    Hi,
    solved with:
    String xpath = "/my:xxx/my:gruppe1/my:gruppe2[last()]";
    XPathNavigator oldGroup = MainDataSource.CreateNavigator().SelectSingleNode(xpath, NamespaceManager);
    XPathNavigator newGroup = oldGroup.Clone();
    oldGroup.InsertBefore(newGroup);
    Regards

  • Can i have xml elements with same name but one is having attrbt..?

    Hi all,
    I am suppose to take input from one system into BPEL.That system is auto gererating xml file. But that file is strange. It has two xml element with
    same name but with completely different sequence. First one is having two comlexTypes while second is having 5 simple types.
    Now the difference is First element is having attribute while second is not.
    So is that file is correct.?
    thanks a lot.
    /mishit

    can you post the file? or load the file into JDeveloper and check the syntax or use XMLSpy for validation of the XML.

  • Import Purchase orders failing with numeric/value error issue

    Import Purchase orders failing with numeric/value error issue

    Hi All,
    Import Purchase Orders program is failing with PL/SQL Numeric or Value Error.
    DECLARE
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 55
    Kindly help me to get the issue fixed

  • Append XML elements with same name in an XML document

    Hi,
    I am using Oracle9i XMLDB utilities to modify an XML document stored in the database. I have a sample XML document like this in the database:
    <Person>
    <Address ID="1"> </Address>
    </Person>
    My task is to include a second <Address> element with a different attribute so that my XML document will become
    <Person>
    <Address ID="1"> </Address>
    <Address ID="2"> </Address>
    </Person>
    After creating the second element, I am using the function xmldom.appendChild() or xmldom.insertBefore() but they remove the first <Address> element and replace it with the second one. This is not what I want since I want both <Address> elements to be present.
    Could anyone please advise.
    Thanks.
    A. Dennis

    Please post your question [url http://forums.oracle.com/forums/forum.jsp?forum=154]here for quick response.
    thank you.
    Regards,
    Anupama
    [url http://otn.oracle.com/sample_code/]OTN Sample Code

  • How to create XML element with out creating a document

    I ve been looking for hours for a method to create an XML element without the need for the Document. I am trying to create objects that access the database, and I need in each of these objects a method that returns only an element (ie. getXMLData()). And in the class that created these object, I nee to call the getXML() methods and construct a document. However, I am not looking to create the document if I am not going to use it. In the component class I need to be able to traverse the xml element and read and modify the values. Is there a way to do so with sun's JDK ?

    I ve been looking for hours for a method to create an
    XML element without the need for the Document.
    ... I am not looking to create the document if I
    am not going to use it.Hi M-A,
    Though you have been told the solution, let's stick to your original issue, just for the sake of interest. I gather what you have in mind is finding the answer to the following question: is there a way of creating a document without having to bind it to any data source? The answer is yes. What you might need is the createDocument() method of the DOMImplementation interface which offers lightwight document handling by obviating the need to construct a particular DOM instance. (You could also use the getDOMImplementation() method of the DOMImplementationRegistry interface, but it has bugs.) Here's a sample code:DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder parser = factory.newDocumentBuilder();
    DOMImplementation domImpl = parser.getDOMImplementation();
    Document doc = domImpl.createDocument(null, "rootnode", null);The above code produces the following document:<?xml version="1.0" encoding="UTF-8"?>
    <rootnode/>You can make this document even skinnier if you pass null values to all three parameters of the createDocument() method, in which case the document will only contain the prolog. I think both the creation and the structure of this document are simple enough for you to use it as some sort of utility (e.g. by putting the code in a separate class) for creating elements.

  • Issue with working on a webservice that has  xml elements with attributes

    This is  a branchout of Thread: Some more complex sample of invokin WS needed_
    We are working on a project that involves a outbound SALT Web service call that includes complex elements with attributes..We are looking for options of how to use FML API's to pass these attribute values from the application code.
    We opened a ticket with oracle where we were suggested to frame the entire xml and pass the xml using the FML32 of the complex element. But when we framed the xml for Service and put the entire XML which includes the attributes using the FML ID of Service.
    Please find a sample Schema and XML similar to the one we are working on...its associated code
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="Service" type="Service_Type" nillable="true">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="Service_Type">
              <xs:sequence>
                   <xs:element name="DateTime" type="xs:dateTime" nillable="true">
                   </xs:element>
                   <xs:element name="UUID" nillable="true">
                   </xs:element>
                   <xs:element name="Status" type="xs:string" nillable="true" minOccurs="0" maxOccurs="unbounded">
                   </xs:element>
              </xs:sequence>
              <xs:attribute name="Version" type="xs:string" use="required">
              </xs:attribute>
              <xs:attribute name="Name" type="xs:string" use="required">
              </xs:attribute>
         </xs:complexType>
    </xs:schema>
    The sample XML is :
    ___<?xml version="1.0" encoding="UTF-8"?>___
    ___<!--Sample XML file generated by XMLSpy v2010 rel. 2 (http://www.altova.com)-->___
    ___<Service Name="TestService" Version="1.1" xsi:noNamespaceSchemaLocation="Untitled6.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">___
    ___     <DateTime>2001-12-17T09:30:47Z</DateTime>___
    ___     <UUID>text</UUID>___
    ___</Service>___
    wsdlcvt generated the mif file with Service as a FML32 type and all its child elements as "mbstring". We tried to leave as it is and we also tried to replace all the child elements and just had a mif entry for "Service" as a mbstring neither produced a different output...Tried to dump using Ferror32 which did not dump any..._
    The sample C/C++ code as per suggestions were to do the following...
    _1) Have a string with the entire XML for Service_
    xmldata="<Service Name=\"TestService"\ Version="1.1\"_ xsi:noNamespaceSchemaLocation=\"Untitled6.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">_
    _     <DateTime>2001-12-17T09:30:47Z</DateTime>_
    _     <UUID>text</UUID>_
    _</Service>";_
    _2) Use Fmbpack32 to create a mbstring data_
    _memcpy(reqmbptr, (char*)xmldata.data(),xmldata.length());_
    _len=xmldata.length();_
    _Fmbpack32(mbcodeName,reqmbptr,len, packdata,(FLDLEN32 *)&packedlen,0);_
    userlog("Size of packedlen is %d",packedlen);
    3) Add the packed data to the output buffer
    Fadd32(fmlbuffer,Service, packdata,packedlen );
    But we do not see the Service tag populated in the GWWS outbound request.Everything else makes it....any help on how to move ahead would be appreciated...

    It seems you switch to the 10gR3 GA and now the whole XML data is mapped to FLD_MBSTRING.
    I will forward my sample to you by mail, but this sample is not offical sample, it is just QA test case. You can refere it and check what's the difference.
    Please let me know your mail address.
    Regards,
    Xu he

  • Getting multiple XML elements with UCCX 4

    I am trying to pick up multiple elements with identical tags from an XML file.
    (Example)
    <NAME1>
    <PHONE>123-1234-3456</PHONE>
    <PHONE>506-245-5566</PHONE>
    </NAME1>
    I am able to pick up the first PHONE, but when using a second Get XML step I get the same again. How do we traverse the file without actually numbering the tags?
    (Thought I did this before, but maybe not...)
    regards
    Johnny

    Hi Johnny,
    Did you ever find a solution?  I'm running into the same scenario.
    Thanks!
    Mike

  • How to map more than one xml element with some Paragraph in a Text Frame

    Hi friends,
    I am new in InDesign Java Scripting and I have to place or map, more than one xml elements of different parents, into one textbox. Is it possible through JavaScript? Can anyone help me in this because I have no idea how it should work and it urgently required.
    Thanks in Advance

    I had answered to you already in your first post: the short answer is that it's not possible on the same text box unless you assign a common ancestor of these two "parents" item. That's not a question of scripting, it's the way Indesign handle the XML with the layout. Import a xml in Indesign and drop tags to page item. What you can do manually is quite representative of what can be done through scripting.
    If you assign this anscestor to the text frame, you have to expect that all text child items will be displayed in the text frame (including the text of all the child of the two "parents" and all the other parents/childs that could be under the common ancestor). Having a XML that is designed for Indesign usage is pretty much inevitable if you are doing anything "serious".

  • Questions regarding creation of vendor in different purchase organisation

    Hi abap gurus .
    i have few questions regarding data transfers .
    1) while creating vendor , vendor is specific to company code and vendor can be present in different purchasing organisations within the same company code if the purchasing organisation is present at plant level .my client has vendor in different purchasing org. how the handle the above situatuion .
    2) i had few error records while uploading MM01 , how to download error records , i was using lsmw with predefined programmes .
    3) For few applications there are no predefined programmes , no i will have to chose either predefined BAPI or IDOCS . which is better to go with . i found that BAPI and IDOCS have same predefined structures , so what is the difference between both of them  .

    Hi,
    1. Create a BDC program with Pur orgn as a Parameter on the selection screen
        so run the same BDC program for different Put organisations so that the vendors
        are created in different Pur orgns.
    2. Check the Action Log in LSMW and see
    3.see the doc
    BAPI - BAPIs (Business Application Programming Interfaces) are the standard SAP interfaces. They play an important role in the technical integration and in the exchange of business data between SAP components, and between SAP and non-SAP components. BAPIs enable you to integrate these components and are therefore an important part of developing integration scenarios where multiple components are connected to each other, either on a local network or on the Internet.
    BAPIs allow integration at the business level, not the technical level. This provides for greater stability of the linkage and independence from the underlying communication technology.
    LSMW- No ABAP effort are required for the SAP data migration. However, effort are required to map the data into the structure according to the pre-determined format as specified by the pre-written ABAP upload program of the LSMW.
    The Legacy System Migration Workbench (LSMW) is a tool recommended by SAP that you can use to transfer data once only or periodically from legacy systems into an R/3 System.
    More and more medium-sized firms are implementing SAP solutions, and many of them have their legacy data in desktop programs. In this case, the data is exported in a format that can be read by PC spreadsheet systems. As a result, the data transfer is mere child's play: Simply enter the field names in the first line of the table, and the LSM Workbench's import routine automatically generates the input file for your conversion program.
    The LSM Workbench lets you check the data for migration against the current settings of your customizing. The check is performed after the data migration, but before the update in your database.
    So although it was designed for uploading of legacy data it is not restricted to this use.
    We use it for mass changes, i.e. uploading new/replacement data and it is great, but there are limits on its functionality, depending on the complexity of the transaction you are trying to replicate.
    The SAP transaction code is 'LSMW' for SAP version 4.6x.
    Check your procedure using this Links.
    BAPI with LSMW
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
    For document on using BAPI with LSMW, I suggest you to visit:
    http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
    http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to handle abstract XML elements with XMLBeans

    Hello,
    I have an xsd that uses abstract elements, and i wanted to ask you how can i create new XML Documents with XMLBeans? My problems is that i don't know how to handle abstaction with XMLBeans.
    Let me show you a very simple example to make you understand my problem :
    Suppose we have the following schema :
    <xsd:schema targetNamespace="http://www.example.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org">
         <xsd:element name="Customer" type="CustomerType" />
         <xsd:complexType name="CustomerType" abstract="true" />
         <xsd:complexType name="PremiumCustomerType">
              <xsd:complexContent>
                   <xsd:extension base="CustomerType">
                        <xsd:sequence>
                             <xsd:element name="CreditCard" type="xsd:string" />
                        </xsd:sequence>
                   </xsd:extension>
              </xsd:complexContent>
         </xsd:complexType>
    </xsd:schema>I use XMLBeans to create a jar with java classes according the xsd above. Then, in order to create a new xml document i use the following code :
    CustomerDocument cd = CustomerDocument.Factory.newInstance();
    CustomerType ct = cd.addNewCustomer();
    PremiumCustomerType pct = PremiumCustomerType.Factory.newInstance();
    ct.changeType(pct.schemaType());With this code i get an XML Document like the following :
    <Customer type="PremiumCustomerType" />But after that, i cannot add an element CreditCard into this Customer element. Can anyone help me?

    In Indesign there is no way you can directly work on the XML-IN footnote, since indesign won't support XML tags in footnote stream.
    To achive that you need to have XSLT/Perl/Indesign Scripting.
    This task is achievable, you can create a auto footnote for XML workflow projects.
    1. Create an XSLT to transform the footnote to the respective places
    2. Change all the "<" ">" to some standard names, since indesign won't accept XML tags in the footnote stream.
    3. Import it in indesign and using script convert it to autofootnote.
    Shaji

  • JMS Queue XML: Elements with same name

    Hi
    I notice that ODI does not do a good job of reverse-engineering JMS queue models where an element name is referenced in different parts of the schema.
    For example:
    root
    ..body
    ...consignment
    ....load
    .....event
    ....unload
    .....event
    etc
    In the above, ODI will reverse-engineer the 'event' element under 'load', but not the one under 'unload'.
    I don't have control over the xsd models and was therefore wondering if there is some sort of workaround I can perform in this scenario?
    Cheers

    Actually, I just found the following Oracle note sums this up: 757642.1
    Is it possible to use the SAME ELEMENT as a SUB-ELEMENT in multiple DIFFERENT Elements of an XML File?
    If so, what is the impact of this approach on the reverse engineered Model and Datastores and how can Integration Interfaces be set up to map these identical ELEMENT for which the content is semantically different and as a result to be used differently in different Oracle Data Integrator (ODI) Integration Interfaces.
    The following XML is a simple example in which the ITEM Element is logically set as a sub-element to three other XML Elements:
    •Shoppinglist
    •GroceryStore
    •HardwareStore
    <Shoppinglist>
    <Item>ShoppingList</Item>
    <GroceryStore>
    <Item>Eggs</Item>
    <Item>Milk</Item>
    <Item>Bread</Item>
    </GroceryStore>
    <HardwareStore>
    <Item>Screwdriver</Item>
    <Item>Hammer</Item>
    <Item>Nails</Item>
    </HardwareStore>
    </Shoppinglist>Solution
    Such an approach must be avoided. This is a strict limitation of the ODI XML Driver.
    See Bug:8563428 DUPLICATE SUBELEMENTS WITH DIFFERETNT TYPES ARE NOT SUPPORTED BY XML DRIVER

  • Remove XML element with JAXB

    Hi all,
    does anyone knows if it's possible to remove an xml element after that element has been set ? Using only jaxb if possible and not using other technology, for example DOM.
    I explain:
    umarshall car -->setOwner("me"); setSpeed("80"); -->marshall car
    will result into:
    <car>
    <owner>me</owner>
    <speed>80</speed>
    </car>
    I would like something that for example
    unmarshall car -->remove(speed); ....-->marshall car
    would result into:
    <car>
    <owner>me</owner>
    </car>
    could someone point out a way to do that ?
    thanks in advance...

    Okay, after peering over your code and trying a few things out I see one immediate problem and one possible improvement.
    The problem lies in this:
    1. if condition is true, remove item
    2. check recursively
    The problem is .. if an item is removed, the following recursive check will always fail. However, the entire loop is wrapped into a try..catch, so InDesign will not alert you that it failed. Instead, it will continue with what's after the loop, exactly because the try..catch is around the entire loop!
    Change the loop code to this
    if((elm.xmlElements[i].markupTag.name == "http") && (elm.xmlElements[i].parent.markupTag.name == "extlink"))
        var Store_CitAttri = elm.xmlElements[i].xmlAttributes.item("c_style").value;
        if(Store_CitAttri == "URL")
          elm.xmlElements[i].remove();
           foundtext = foundtext + 1;
           continue;
    Query_Remove(elm.xmlElements[i]);
    so the recursive checking is skipped. You can also remove the entire try..catch block, as this may hide additional errors ...
    The improvement is: as I started reading this thread from the top again, shouldn't you be removing the "extlink" items, rather than just the "http" ones inside?
    If so, remove the parent of the found item (which is always the "extlink"):
          elm.xmlElements[i].parent.remove();
    -- and, as this will break the loop (because you just removed the set of elements it was working in!), replace 'continue' with 'return'.
    Hope this helps

  • How can I concatenate a currency field (eg: 12.25) with numeric values

    Hi,
    I ma working in ECC6.0.
    How can I concatenate a currency field (eg: 12.25) with numeric and character values into a variable.
    I want to concatenate 12.25  with  "+"  and  "0".
    Regard,
    Divya

    Hi,
    I ma working in ECC6.0.
    How can I concatenate a currency field (eg: 12.25) with numeric and character values into a variable.
    I want to concatenate 12.25 with "+" and "0".
    Regard,
    Divya
    ==================================
    data: l_string type string.
    move l_curr_field to l_string.
    condense l_string no-gaps.     "if needed
    concatenate l_string '+' '0' into l_string.
    now your l_string will have all the values.

Maybe you are looking for

  • Would like to create a script for list all elements and structure of an indesign document

    Hello everybody, I'm a very beginner in indesign scripting. I would like to create a script in order to list all elements and the inner structure of a n indesign document. The aim for me is to understand how elements are sorted and arranged into inde

  • Planning Function in Web Excel Layout

    Hi, I have a planning function of type EXIT which I have incorporated as Function After Data Change in my Web Interface Builder.  According to documentation the planning function should execute when you switch layouts or click "Refresh" or "Save" but

  • Problem in Data Upload

    Hai Guys, I am facing one problem when i am uploading data. Now only we have created R3 production source system. In the R3 system datasource having data. But when i am uploading the data in BW system, it is giving only 0 records. Any settings is mis

  • Getting a reply from a pop up to confirm

    Hi. I was giving a popup to the user to confirm something using create_popup_to_confirm of the window manager. Now, problem is I coded it in one method of the view. I want to call this popup method now at different user interaction stages of the view

  • Export meet ora-3113 error!

    In my database there are two scheama t1 ,t2. When I use the command 'export' to export the data in 'USER' mode,one of the scheama t1 meet the oracle error ORA-3113,but the other t2 is ok! the error occured when t1's tables are exported and would be e