Syntax for doing multiplication,division ,subtraction in xml

Hi Experts,
I need help in coding this statement in xml .
(No of units per case * price per consumable) / (end_date-start_date)
Please help
Thanks

For basic operations, you just need to use operator and operands.
ex:
<? 10 * 10 ?>
<? 10 + 10 ?>
<? 100 - 10 ?>
<? 10 div 10 ?> -- you can't use / for divide, good way is to use
<?xdoxslt:div(10,2)?>

Similar Messages

  • Syntax for multiple stoplist devices

    Hi
    I want to stop monitoring certain disk devices on my server. I know there is a file under /etc/opt/SUNWsrsvp called event_pvr_config.cfg. In this file there is a tag called event.device.stoplist. My question is what is the syntax for entering multiple devices? I tried putting multiple tags but it does not looking like it is working because I am still seeing messages going to the /var/adm/messages file.
    Thanks

    A possibilty might be to add code to create a virtual package for graphical-su .
    Here's an example of how this could work in pseudo-code :
    package_backintime_detect_graphical_su_dummy()
    _gksu_installed = false; kdesu_installed = false;
    If gksu is present then _gksu_installed = true ;
    if kdesu is present then _kdesu_installed = true;
    If _gksu_installed OR _kdesu_installed then provides = backintime_graphical_su
    Add a depend on backintime_graphical_su to the gui program and some comments to clarify how to build.

  • XML parser for fatching multiple values from XML

    Hi,
    In my scenirio i have to facth multiple values from XML file and then set in to Table in webdynpro...
    Fo example my xml has values like...
    <xml>
         <item>
              <item1>
                   <quantity>
                        100
                   </quantity>
                   <price>
                        50
                   </price>
              </item1>
              <item2>
                   <quantity>
                        200
                   </quantity>
                   <price>
                        20
                   </price>
              </item2>
              <item3>
                   <quantity>
                        300
                   </quantity>
                   <price>
                        10
                   </price>
              </item3>
         </item>
    </xml>
    then i have to fcath those quantity and price and set in to table...
    How to do taht in webdynpro and does any one have parser code for retriving multiple values...

    Hi,
    1) You need to use JDOM parser.
    2) The code for parsing XML using JDOM parser is readily available if you search on google.
    3) You will have to check the attribute during every parsing and then if attribute is quantity you can fetch the corresponding tags.
    4) Something similar to this:
    org.jdom.Document document = parser.build(file);
                    org.jdom.Element rootElement = document.getRootElement();
                    org.jdom.Element childElement = rootElement.getChild("file");
                    Element xmlElement = childElement.getChild("item");
                    if (xmlElement != null) {
                        List itemElementsList = xmlElement.getChildren("item1");
                        if (itemElementsList != null) {
                            Iterator iterator3 = itemElementsList.iterator();
                            while (iterator3.hasNext()) {
                                //For each group get quantity
                                Element itemElement = (Element) iterator3.next();
                                List quantityElementsList =
                                        itemElement.getChildren("quantity");
                                if (quantityElementsList != null) {
                                    Iterator iterator2 =
                                            quantityElementsList.iterator();
                                    while (iterator2.hasNext()) {
    // Your code                                                                               
    You might need to make some changes as per your rquirement. Just use this sample to understand how you need to parse the xml
    Hope it helps.
    Regards.
    Rajat
    Edited by: Rajat Jain on Jan 22, 2009 9:51 AM

  • XML syntax for tags

    It has always been a habit of mine to use XML syntax for CF tags since I've been working with XHTML. For instance, I will do <cfset var myVar = "" /> However, I noticed when doing <cfdump var"#myvar#" />, the output is displayed twice. So now I am wondering if whenever I use a /> on something such as cfset, is the tag actually executing twice? How does this affect performance?
    I just happened to notice that in CFBuilder, when I do <cfargment name="myVar" required="true" type="string" default="" />, when I go to the next line and start typing <cfarg auto-suggest will select the cfargument tag, but this is only if I use a />. If I omit the ending forward-slash, auto-suggest does not work. That may be a setting specific to CFBuilder, but that wasn't the scope of this question.
    What syntax is correct and how does it affect performance?

    According to the document I've linked to below; using self-closing CF tags, such as <cfset myname="Bob" /> is permissible.  The document also notes exceptions to this such as CFIF and custom tags as examples where a self-closing tag shouldn't be used.
    http://livedocs.adobe.com/wtg/public/coding_standards/style.html
    Althoguh it doesn't look like it, that's an internal coding standard for one of Adobe's (well: it was Macromedia at the time) internal teams, and is not supposed to be a suggested standard for everyone.  I've had this same discussion with them, too.
    As Owainnorth (and many others) observe, it's completely doable.  My only challenge to it (and it's a challenge I state in an unduly heavy-handed fashion sometimes!) is the nonsensical rationales people use for doing it: making it more like XML, it's good if the CFML blends in better with the XHTML mark-up it's generating, it's tidier, etc.
    I hasten to add that Owainnorth's position that he finds it easier to read and assists with code navigation, whilst leaving me with a blank look on my face, is a completely reasonable basis for doing it.  I personally don't believe it, but there's no reason why that should bother him (and I'm sure it doesn't).
    I think it was reasonable of me to challenge his wording that it's easier to identify where CF code blocks are by looking at the closing slash rather than the tag name; but having explained himself better, I reckon it's not quite so much tosh as it originally sounded.  I mean: I still can't see it, but obviously he can, so fair enough.
    Adam

  • Design pattern for converting multiple complex Java objects to XML

    What is the traditionally accepted high performance mechanism for converting Java objects to XML? Some options I have explored are:
    1. SAX-JAXP
    2. DOM-JAXP
    3. JAXB
    4. Castor
    Which of these usually performs the best for large, complex objects which contain multiple subobjects?
    Thanks.

    Take a look at XStream. It will simplify your life considerably.
    Typical code snipped
    XStream xStream = new XStream();
    xStream.toXML(someJavaObject);That's it. Regarding the others...
    1. SAX-JAXP
    Can be used for XML -> Java Objects, but you have to write significant amounts of ugly, high maintainenance code
    2. DOM-JAXP
    Slower and more memory intensive than SAX because you need to read the whole object into memory first. Just as ugly and high maintenance.
    3. JAXB
    Actually very good for going from a POJO to XML, but rubbish in the opposite direction. The worst part is it adds an extra step to your build process as you need to tell it to generate and compile the source for doing this.
    4. Castor
    Not used it since JAXB came out. Works pretty much in the same way but also supports XML -> POJOs.

  • How to print multiple footers for each page in RTF template xml report.

    Hi,
    How to print multiple footers for each page in RTF template xml report.
    i am able to print ( two sets ) ...
    up to last page ( one template ) and for last page ( another template).
    i want to change the footer information based on the group value printed in the report ( it might be 5 to 6) In every report run.. can you please check and let me know do we have any feasibility to achieve this.
    Thanks in advance.
    Regards,
    KAP.

    You can remove all other logic, like last page only contents (start@last-page:body), etc and section breaks if any you have inserted manually.
    Just have for-each@section logic.
    It would be difficult for me to guess what you have done without looking at your RTF or describing here.

  • What does "domain name is used for your typekit fonts & SEO sitemap.xml" mean?

    Why is Muse now asking, on either uploading files via Muse or externally through another ftp, for a domain name that is used for your typekit fonts & SEO sitemap.xml?
    I used Muse for exporting my files to ftp externally a few months back and I could add whatever I liked into the domain name field (which made sense as I could choose an appropriate name). I upgraded Muse this morning and now no domain name I add in here is accepted and on hovering over the info icon I get a "domain name is used for your typekit fonts & SEO sitemap.xml. What does that mean exactly?
    If anyone can help?

    Hi Guys
    Great thread Omniscient! Like Bian, my username is just my name. It's a unisex name and caused a nice little debate in the early days of this forum as to whether I was male or female!
    Kerry is from the Irish meaning 'dark-haired' but I am a blondie (natural blonde when younger, bottle blonde now I am older!) I think my mum just liked the name...
    There are lots of interesting usernames out there - tell us about them and where they come from!
    Cheers
    Kerry
    Retired BTCare Community Manager - StephanieG and SeanD are your new Community Managers
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Syntax for xml

    hi, I would like to know the syntax of date, datetime and timestamp when xml is data source
    date , is it yyyy-mm-dd, e.g. 2009-01-01 ?
    what should be for datetime ?
    what should be for timestamp ?
    thank you very much!

    Check here:
    http://www.w3schools.com/Schema/schema_dtypes_date.asp
    You must use the canonical ISO date format.
    Cheers
    Nico

  • Can I edit the system file Manifest.XML in Word for Windows? (there's a reason for doing this)

    I renamed a file directory containing several PDFs. Consequently, Adobe Digital Editions says these files are missing when I try to open them and look at notes I made. There seems to be an obvious solution, but I'm unfamiliar with XML and don't want to screw things up. The file locations and a lot of other information for Digital Editions is in an XML file called Manifest. If I can edit the XML file to show the correct directory, I expect I'd be able to see these files and recover my notes. I'm unsure what Word for Windows may do (e.g., add or delete characters) when I edit and save the new Manifest.  That might corrupt the Manifest and be extremely counterproductive.
    Is editing the file locations in Word for Windows safe, so long as Digital Editions isn't open when I do my editing? 

    I can confirm that Notepad++ can happily edit manifest.xml files, but as Jim_Lester says, make a backup (especially if you are not used to XML).
    You may well find that if you Open the .epub files from their new location explicitly from ADE (ctrl-O) that you will both be able to read documents and see the notes.
    I can't vouch for that; but if it works I'd recommend it over editing the manifest file.

  • What is hana ? does the syntax for abap in hana changes ?

    Hi All,
    I am very much interested to know HANA.
    can any one please explain me ???
    can we use normal ABAP syntax for HANA?
    Regards,
    Abdul

    Hi Abdul,
    first of all I suggest you to look into the detailed info material available here in this space. A good introduction for developers is to look into our reference scenario page: ABAP for SAP HANA Reference Scenario
    With our SAP HANA Database existing ABAP Coding will still run like on any other database. But with SAP HANA you also have the possibility to leverage specific features of this database.Information about these features can be found here: New ABAP for HANA features in SAP NW 7.4 SP5
    If you want to try it out yourself, here is a new end-to.end guide: Brand-new ABAP 7.4 for SAP HANA End to End Deve... | SCN
    Hope this helps, Cheers
    Jens

  • Variant Configurator - Syntax for "contains" on multiple entry option ch.

    I'm new to SAP, the VC and this forum so please direct me to the correct spot to pose my question.
    I'm trying to write the syntax around a multiple entry charachteristic.  It doesn't like '=' or ' IN ('x','y','z') ' because of the possibility of multiple picks.
    Any thoughts?
    Thanks,

    Hi,
    Please refer to the following section.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/92/58d455417011d189ec0000e81ddfac/frameset.htm
    Thanks,

  • Multiple namespaces in an XML document

    I have an XML document that I am trying to use within a data flow (XML Source)--the problem is that I keep getting an error message stating that the XML document has multiple namespaces and therefore, SSIS will not create the XSD for me.  If I take out the second namespace, I am able to successfully get the task to execute, but this XML is created with 2 namespaces and there is no way to get around this (I cannot get the report server to change these parameters)--my question is: does anyone know of a way to get SSIS to handle multiple namespaces so that I can process this XML document and extract the necessary data elements from it.
    Any assistance would be greatly appreciated.
    Thank you!!!!

    I am replying too much late..........thinking might be useful for someone !!!!
    SSIS does not handle multiple namespaces in the XML source file. You can find examples where you see the format
    <Namespace:Element>.
    The first step to avoid multiple namespaces is to transform your source file to a format that doesn’t refer to the namespaces.
    SSIS has an XML task that can do the transformation. Add the XML task to an SSIS Control Flow and edit it.
    Change the OperationType property value to XSLT, the SourceType to File connection and the Source to your source file that has the problem.
    Set the SaveOperationResult property to True.
    Expand the OperationResult branch and Set DestinationType to File Connection and the Destination to a new XML file.
    Add the following to a new file and save it with an xslt file extension.
    <?xml version="1.0" encoding="utf-8" ?> 
    <xsl:stylesheet version="1.0"         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
      <xsl:output method="xml" indent="no" /> 
      <xsl:template match="/|comment()|processing-instruction()"> 
        <xsl:copy> 
          <xsl:apply-templates /> 
        </xsl:copy> 
      </xsl:template> 
      <xsl:template match="*"> 
        <xsl:element name="{local-name()}"> 
          <xsl:apply-templates select="@*|node()" /> 
        </xsl:element> 
      </xsl:template> 
      <xsl:template match="@*"> 
        <xsl:attribute name="{local-name()}"> 
          <xsl:value-of select="." /> 
        </xsl:attribute> 
      </xsl:template> 
    </xsl:stylesheet> 
    Back in the XML task, set the SecondOperandType to File connection and the Second Operand to your new XSLT file.
    When you run the XML task, it will take your original file and apply the transformation rules defined in the XSLT file. The results will be saved in your new XML file.
    This task only needs to be run once for the original XML file. When you look at the new file, you’ll see the same data as in the original, but without namespace references.
    Now you can return to your data flow and alter the XML Source to reference the new XML file.
    Click on the Generate XSD and you should be able to avoid your error.
    When you click on the Columns tab in your XML Source, you will probably see a warning. This is because the data types may not be fully defined (for example there’s no mention of string lengths). This shouldn’t be a problem as long as the default data type
    (255-character Unicode string) meets your needs.
    =================life is beatiful..so !!===========
           Rahul Vairagi
    =================================== Rahul Vairagi =================================== My Blogs: www.sqlserver2005forum.blogspot.com www.knwhub.blogspot.com

  • What are the tools for doing xslt mapping.

    Hi All,
    I am doing a a scenario with xslt mapping. Can anybody give be step by step procedure for doing xslt mapping.

    Hi Ankur ,
    U can use Altova XMLSpy for XSLT Mapping.
    See the below links
    XSLT Mapping
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    Step by Step procedure:
    for doing xslt mapping you need to create a .xlst file containing the xslt mapping of source and target data.
    U can use Altova XMLSpy for creating .xslt mapping.
    Following following steps for executing this mapping.
    1. Create Source Data and Target Data Type in IR.
    2. Take xml representation of source data and open it into Alto XMLSpy.
    3. Create .xsd file for above source xml data.
    4. Repeat above two procedure for Target Data.
    Now Creating .xslt file you need to Use Alto MapForce.
    Steps will be:
    1. Open the Alto MapForce. Import the source .xml and .xsd file in it.
    2. Similarly import the target .xml and .xsd in the MapForce.
    3. You will have both source and target data available in MapForce in similar fashion as you have in IR.
    4. Do the graphical mapping using extensive list of functions available there.
    5. Save the mapping file.
    6. Click the XSLT Tab . You will have the entire .xslt logic there.
    6. Copy the above content and save it as .xslt file.
    7. Create a jar file for the above .xslt file.
    8. Go to IR , Import the .jar file into 'Imported Archive'
    7. In Message Mapping , Choose XSLT from drop down box of Message program.
    8. Import the jar containing the .xslt file.
    9. Test the mapping

  • Question on syntax for role portion (LH side) of the credential

    I am concerned about syntax for the role portion (the stuff to the left of the "@" sign). Specifically, what are the illegal characters? Can I use dashes and periods? And I presume I can intermix alpha and numeric characters, and I need to know if that's not the case.
    Thanks,
    Rob

    That's a little complicated ... there are multiple layers to consider.
    Firstly, recall where credentials go ... they go in iTunes U URL (URI) query component. WIthin the query component of any URI, certain characters are reserved. Those characters are:
    From RFC 2396:
    The query component is a string of information to be interpreted by
    the resource.
    query = *uric
    Within a query component, the characters ";", "/", "?", ":", "@",
    "&", "=", "+", ",", and "$" are reserved.
    So you'll want to avoid those characters outright. In addition, there are characters that are not allowed (or have special meanings within) any URI (again I refer you to RFC 2396).
    My suggestion would be to apply the same rules as would apply to a variable within most programming languages ... you're safest if you stick to alphanumerics and the underscore, start with an alphabetic character.
    Recall, too, that while you use roles in whatever way makes most sense for your site, the intention is to use that slot as, well, a "role" ... you should be able to define that simply, in most cases, without the need for special characters. A "role" would be something like "Student" or "Instructor" or "Visitor" or "Guest" or "Actor" or "Producer" or "Editor" or "Dean" or "VideoProductionAssistant" or "Administrator" ... think of a role not so much as who somebody "is" within iTunes U, rather think of it as the place to describe what a person "does" within iTunes U. I suspect ... and I could be wrong ... but I suspect that the reason you're asking about special characters is because you want to create a role-per-user at your site ... and you want to make sure your rules for usernames will map to what's allowed in the role slot.

  • Flex 3: syntax for populating ArrayCollection by loop

    Hi, I'm a newb. I can't find an example of how to do this. Any examples would be greatl appreciated.
    I want to chart some engineering data by populating my chart's dataprovider with an array collection (so far no problem). I want to poulate the array collection by looping through a math expression and I can't figure out the syntax for that. For example...
    [Bindable]
    private var myChartData:ArrayCollection = new ArrayCollection([
        {vertNum:100, horizNum:100}
    I want to loop through and add more points programmatically so if I loop 5 times I end up with...
    [Bindable]
    private var myChartData:ArrayCollection = new ArrayCollection([
         {vertNum:100, horizNum:100},
        {vertNum:110, horizNum:110},
        {vertNum:43, horizNum:120},
        {vertNum:88, horizNum:130},
        {vertNum:140, horizNum:140},
         // etc...
    The number of horizontal variables to plot ould be in the hundreds, so I don't want to set up a huge static array collection with expressions in each location. I'd prefer to solve the expression as a loop iterates and populate the array collection as it goes. But I haven't got a clue how to 'word' that.
    thanks!

    Here is an example of adding data points from a simple formula using a random number generator and scaling the randomness up. The process is just to create a new Object for each iteration of the loop and add the object to your ArrayCollection. You can assign as many properties to the object as you need, which can be helpful for using one ArrayCollection that is displayed in multiple charts.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="build_model()">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                private function build_model():void {
                    var obj:Object;
                    var chartAC:ArrayCollection = new ArrayCollection();
                    for (var i:uint = 0; i < 100; i++) {
                        obj = new Object();
                        obj.horizNum = 100 + 10 * i;
                        obj.vertNum = i * Math.random();
                        chartAC.addItem(obj);
                    linechart1.dataProvider = chartAC;
            ]]>
        </mx:Script>
        <mx:LineChart left="10" right="10" top="54" bottom="10" id="linechart1">
            <mx:series>
                <mx:LineSeries displayName="Series 1" yField="vertNum" xField="horizNum"/>
            </mx:series>
        </mx:LineChart>
        <mx:Button x="10" y="10" label="Build Model" click="build_model()"/>
    </mx:Application>
    Chris

Maybe you are looking for

  • ABAP WEBDYNPRO - What is it all about ?

    Hi Guys & Gals, I am doing ABAP for last 5 years. Planning to learn ABAP WEBDYNPRO from any SAP education partner. But i don't know JAVA and Classes and Methods(Scared of these). 1. Can i cope with ABAP WEBDYNPRO ? 2. Is it more programming or layout

  • Java command not working - path problem ?

    Im not really new to Java, but rather new to Linux :=) Ive got NetBeans setup and working great on Redhat 7.2 and I can run Java apps from within the IDE...but not from a command line. I get "bash: java: command not found" This tells me something is

  • Saving information in forms

    Hi i hace been able to save information in forms after moving from one form to another in java swing applcation. i got rid of the dispose() code. however is there a way to actually keep the cutrrent values when i exit the application and open it agai

  • Simple search- Help

    I have designed a page with 3 attributes.When I pass the employee number I should get other two values form database on the page. I am getting No Current row for VO error. Following code(defined in AM) is called from controller on press of submit(for

  • No bluethooth with iOS 7.1

    Hello, After I updated iOS 7.1 to my iPhone 4S, it doesn't see any other devices  via Bluetooth. The most important for me is that I can't pair my phone with my car, there were no problems before. Tried "Settings > General > Reset > Reset Network Set