Menu from XML

Hi. I suggest you a little game.
Given an XML file defining a menu :
<?xml version="1.0" encoding="UTF-8"?>
<Application>
<Menus>
  <action type="add">
   <Menu Checked="0" Enabled="1" FatherUID="43520" Position="13" String="Miscellaneous Demo" Type="2" UniqueID="99999">
    <Menus>
     <action type="add">
      <Menu Checked="0" Enabled="1" FatherUID="99999" Position="0" String="Custom Form" Type="1" UniqueID="menuCustomForm" />
     </action>
    </Menus>
   </Menu>
  </action>
</Menus>
</Application>
why this code create the menu
Private Sub AddMenuItems()
     Dim oXmlDoc As New MSXML2.DOMDocument
     Call oXmlDoc.load("MyMenu.xml")
     Call m_app.LoadBatchActions(oXmlDoc.xml)
End Sub
and this other no?
Private Sub AddMenuItems()
     Dim x As XmlDocument = New System.Xml.XmlDocument
     x.Load("MyMenu.xml")
     m_app.LoadBatchActions(x.InnerXml)
End Sub
Who give me the answer wins my many thanks.
Ciao. Nicola

I only use the second way, and it works like a charm...
I'm using C#.Net though...
But, what the problem could be, a while ago, when I tried LoadBatchActions(myXmlDoc.InnerXML);</i> C# did throw me an error before compiling. Something about <i>myXmlDoc.InnerXML</i> was not allowed directly in <i>LoadBatchActions</i>. So try this:
<b>Code (C#)</b>
private void AddMenuItems()
  /* New XML document */
  XmlDocument x = new System.Xml.XmlDocument();
  /* Load the xmfile and put it's content in a string */
  x.Load("MyMenu.xml");
  string sXML = x.InnerXml;
  /* Load the xml into the SBO application */
  SBO_Application.LoadBatchActions(sXML);
Probatly that wil work.

Similar Messages

  • Swing Menu from XML

    I'm looking for a tutorial that can teach me how I can generate a Swing Menu from an XML file. I've looked all over the internet but I can't find a decent tutorial on the topic. Can anyone help me?

    https://sam.dev.java.net/

  • Automate DVD menu from XML?

    Hi
    Is there any way to create an XML file to layout the menu interactions? I have to produce about 80 menus and they are all similar. I was hoping there might be a way to set it up in a spreadsheet, then export to XML for import into Encore.
    I've Googled around for a while but not even a whiff of an answer, so I assume not....anyone with experience of easy ways to duplicate menu items and their links?
    Thanks

    Edit>Duplicate?

  • Fm11 does not have the buttons to change from XML to WYSIWYG views

    Hi, my Fm11 does not have the buttons to change from XML to WYSIWYG views. It only has the WYSIWYG view, and it does not have the Structure Tools,DITA, S1000D menu options.
    In File>New, there is not XML option neither…. What am I doing wrong? Thanks

    Hi Arnis, Thank you very much for your help, that was it !!! Greetings from Mexico

  • Apply spry functions on data uploaded from xml?

    Hi,
    I am trying to "simplify" my personal pages so I have only 1
    html page and everything else is taken from xml through spry
    framework (guys ... I love it .. super work)
    But currently I am stuck on one issue:
    Step 1
    I replace the html parts -> I just put the html code to
    xml node inside CDATA and call spry:setrow
    Step 2
    I would like to use the spry:detailregion /
    spry:repeatchildren in the code that is inside CDATA ... but here I
    am not successful yet
    Is this possible? Or can you give me some hint/other
    direction (I woul love to stay with XML and do not want to use the
    Tabs)
    You can check it here
    http://doma.princ.biz/test-ajax/index.html
    - (it is slow) click on Hudba and you will see what I ment. The xml
    is music.xml so you can check the structure.
    Thank you very much for help.

    Hi,
    little update - I put the "final" state together with using
    the tabs - it is not best solution because the page reads lots of
    data on the load. But it is the state I would like to reach by
    using xml some how
    http://doma.princ.biz/test-ajax/index-tab.html
    See the left menu and the changes in the middle and on the
    right side.
    The menu Hudba and then the accordion works now.
    Any idea how to get the same stuff without spry tabs?
    Thank you very much
    Jiri
    (using spry 1.4 - do not know if 1.5 will be help
    here)

  • Load data from XML files into BI

    Hi All,
    Can any one guide me through the steps which involve in loading data from XML files into BI?
    Thanks
    Santosh

    Hi James,
    I have followed upto step No: 12 .
    Please could you let me know how to link the XML file on my local drive to BI,
    I am not able to find figure out where to specify the path of the XML file to be loaded into BI.
    Thanks In Advance
    Regards,
    San
    1. Create a Infosource(ZIS), with transfer structure in accordance with the structure in the XML file. (You can open the XML file with MS Excel.This way you can get to know the structure).
    2. Activate the transfer rules.
    3. After activation ;from the Menu Bar , Select Extras>Create BW Datasource with SOAP connection.
    4.Now Activate the Infosurce again, this creates an XML based Datasource(6AXXX...)
    5.These steps would create two sub nodes under the Infosource(ZIS).
    6.Select Myself system and create a data package and execute it run in Init mode(without Data Transfer).
    7. This would create an entry in RSA7(BW delta Queue)
    8. Again create another Delta Infopackage under it, and run it. Now the Datasource(6AXXXXXX..) would turn green in RSA7.
    9.In Function builder(SE37) select your FM( do a search ,F4, on the datasource 6AXXX....) .
    10.Inside this RFC based FM , from the Menu Bar select Utilities>more Utilities>Create Web services>From Function module.
    11.A wizard will guide you through the next steps .
    12.once this is done a Web serrvice would be enabled in WSADMIN. Select your FM and execute it.
    13.From here you can upload the data from XML file into BW delta queue.
    Edited by: Santosh on Nov 30, 2008 2:22 PM

  • Populating a Drop-Down Menu via xml in php

    I am new at programming. I am looking for a way to link a drop menu to 3 drop down menus dynamically. In other words, the 3 ddm's will have the same options according to the value selected in first ddm. Can someone provide a tutorial for this? Also, i am using php to pull the data for those ddm's from xml file.
    Thank You

    php is server side... so you want user to choose option from dd menu #1, reload the page to populate dd menu #2 (process on server via php), choose option from dd menu #2, reload the page again to populate dd menu #3 (process on server via php), then finally choose option from dd menu #3 and then after reloading the page three times already (once for initial load and two more time for each subsequent server process) load the page for a fourth time to process the entire form entry? Whoa daddy... that's a lot of page loads.
    Just want to be clear of your desire. I don't think you'll find many tutorials for the mentioned method. There are many, many three tier drop down menus in javascript that provide client side processing without page reload.

  • Load Sales Order from Xml file

    Hi,
    I want to load a sales order from xml file. How can I do so? Where I'll get the xml schema for Sales Order or other documents (delivery,invoice etc)?
    Plz reply with code and xml file.

    When I'm going to load SO from xml file, it's showing an error:
    "The connected value 0 was not found in table Uasge of Nota Fiscal".
    What is this table for? Which attribute is related with this table?
    How can I find out that?

  • I want to load a sales order from xml file. How can I do.

    Hi,
    I want to load a sales order from XML  file. How can I do ? how can i create the sales order?
    what are the necessary  setting for  create the sales orders.
    with Regards,
    Prakesh.

    Three options come to my mind.
    Option 1: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (BAPI) and Program (CREATEFROMDAT2).
    Option 2: Use SAP transaction SXDA_TOOLS (Object Type BUS2032), Program Type (DINP) and Program (RVINVB10).
    Option 3: Translate the xml to IDoc so that ORDER04 / ORDER05 Idoc can be used to create Sales order (WEDI transaction).

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

  • How to get string value from xml in JSF??

    In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF

    Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
    JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization.

  • Update or delete table from XML

    Is it possible to update or delete table's row from XML file?
    Thanks
    Prasanta De

    Hi Steve,
    Thanks for your reply but I could not find any example from the documentation for update-request or delete-request. I need your help in this regards.
    1. I have emp table with many rows and the simple structure like this
    DEPTNO NUMBER(2)
    EMPNO NUMBER(2)
    EMPNAME VARCHAR2(20)
    EMPSAL NUMBER(8,2)
    Key is defined on deptno and empno
    2. I have a xml file like this
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <DEPTNO>1</DEPTNO>
    <EMPNO>11</EMPNO>
    <EMPSAL>1111.11</EMPSAL>
    </ROW>
    <ROW num="2">
    <DEPTNO>1</DEPTNO>
    <EMPNO>12</EMPNO>
    <EMPSAL>2222.22</EMPSAL>
    </ROW>
    <ROW num="3">
    <DEPTNO>1</DEPTNO>
    <EMPNO>13</EMPNO>
    <EMPSAL>3333.33</EMPSAL>
    </ROW>
    </ROWSET>
    3. I want that xsql servlet will read this xml file and update EMPSAL column depending upon the value of DEPTNO and EMPNO from xml file.
    Please let me know how I should use update-request in xsql page.
    Thanks
    Prasanta De
    null

  • Printing on Pre-printed stationary from XML Publisher

    Hi,
    I have a requirement where a report is to be printed on pre-printed stationary from XML Publisher. The stationary would be NCR paper and has to be printed from a dot matrix printer.
    My first question is whether report generated from XMLP can be printed thro'
    dot matrix printer, coz as far as i know it takes only character format .If yes, do we need any special handling?
    If anybody has any experience related to this problem, please let me know the approach.
    Can mail me at [email protected]
    Regards,
    Satrajit

    Hi Milind
    I see what you've got.
    It is not uncommon to use character mode output for pre-printed stationery.
    This would appear as draft output from a Dot Matrix printer. I hope you understand what I mean here. It is somthing like printing using fixed width font.
    Design and run the report with MODE=CHARACTER from the command line.
    You need to figure out and design the layout in such a way that you are printing in the empty spaces provided in the pre-printed stationery. This is usually by trial and error method. You may probably blow several pre-printed stationery sheets before you get it right.
    Regards
    Sripathy

  • How to retrieve data from XML

    I have a scenario where I need to read data from database of xmltype (data type)
    Table Structure :
    Create table Ex_Tb (id number(30),emp_data XMLType );
    I can save xml content in database,
    Sample
    insert into Ex_Tb values( 1, xmltype ('<?xml version="1.0" encoding="UTF-8" ?><userdata><uniqueid>54321</uniqueid><name>moorthi</name><age>25</age><city>Chennai</city></userdata>'));
    Data inserted .
    When retrieved from DB I see the data in the generated BO as given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ExteOutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/pcbpel/adapter/db/Exte file:/C:/JDeveloper/mywork/Application1/Project1/xsd/Exte.xsd" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/Exte">
    <ExteOutput>
    <SDD_XML_REQ_DATA_GETCLOBVAL__><?xml version="1.0" encoding="UTF-8" ?><userdata><uniqueid>54321</uniqueid><name>moorthi</name><age>25</age><city>Chennai</city></userdata></SDD_XML_REQ_DATA_GETCLOBVAL__>
    </ExteOutput>
    </ExteOutputCollection>
    My Question :
    1. How to retrive values of individual tags contained within the embedded XML so that it can be mapped to a BO?
    Basically I would like to map uniqueId, name,age,city from xml to a BO.
    Rgds,
    Krishna

    Hi Krishna,
    I'm not sure but are you selecting the data from the XMLType column as given in the section Using XMLType in an SQL Statement in the below doc?
    http://docs.oracle.com/cd/B10500_01/appdev.920/a96620/xdb04cre.htm#1030582
    Regards,
    Neeraj Sehgal

  • How to retrieve image from XML  file

    Hi All,
    I am new to XML. So any best guidance is appreciated.
    The application requirement is to display image retrived from uploaded xml file in file upload section of our application. And store that image in database.
    In my XML file , images & strings & numbers & booleans are there . I am able to save everything in database except images .
    I am using JSF, Seam & Hibernate combination. In my Hibernate entity class i took BLOB datatype for image.
    I am using following tags in my Xhtml file to display image
    <s:graphicImage value="#{hibernateentitybean.picBlobtype}" height="200" width="200">
    <s:transformImageSize width="200" height="200" />
    <s:transformImageType contentType="image/jpeg"/>
    But image is not displayed in Xhtml file
    I am using org.w3c.dom.Document for retrieving node name & corresponding value in that node in XML file.
    I am getting code like below for Image when i am logging all values from XML files in my bean class .
    x0lGQRQAAAABAAAAAAAAAFJHAQARAAAAVwBhAHQAZQByACAAbABpAGwAaQBlAHMALgBqAHAAZwAAAP/Y/+AAEEpGSUYAAQIBAGAAYAAA/+0YLl
    I want to convert this value to image. So i can convert image to bytes and store in BLOB.
    Can anyone guide me ? or any other approach .
    Thanks in advance for any reply.
    Regards,
    Naresh

    Dan_Koldyr wrote:
    agree, it's really odd. Just reread OP and it says:
    NareshDharmiVatsal  wrote:
    want to convert this value to image. In any case it doesn't get worth then another single code line:
    final String cdata = "x0lGQRQAAAABAAAAAAAAAFJHAQARAAAAVwBhAHQAZQByACAAbABpAGwAaQBlAHMALgBqAHAAZwAAAP/Y/+AAEEpGSUYAAQIBAGAAYAAA/+0YLl";
    final sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
    final byte[] data = decoder.decodeBuffer(cdata);
    Blob blob = new SerialBlob(data);//or what ever other DB-specific blob implementaiton Did i answered original question? Any more comments to my first replay?I can comment on this latest code. The package sun.misc is private to Sun (Oracle now of course). It is undocumented and may change or be removed altogether in a future release. There is a good free open source Base64 decoder in the Jakarta Commons Codec library.

Maybe you are looking for

  • Ipod nano 2 generation right headphone won't work, issue with jack (several headphones were tried)

    For some reason, my ipod nano 2nd generation, doesn't play music through one of the headphones. i tried several pairs of headphones. but just one will work. any suggestions? obviously out of warranty

  • Cucm 8.6 to 9.1 elm

    Hello Guys, We are moving from 8.6 to 9.1 in a day and we have 750 Unified Workspace licensing. and 6015 DLU's. I see a total of 6765 units of licenses on the license report. How does this convert to 9.1 user based scheme. Is there a converting ratio

  • RTL Illustrator cc 2014

    I installed Illustrator cc 2014 via the Application Manager, after I defined "English  "תומך עבריתin the app setting. Even though the RTL (right-to-left) works in Photoshop and InDesign, its fails to work in Illustrator. The ME (Middle East) options

  • Adobe Interaction form as Attachment of Email

    hi experts, my requirement: I have a report and an Adobe form. my report will generate this form in each loop and mail it. I am getting the PDF form object and passing it to the Email FM: SO_NEW_DOCUMENT_ATT_SEND_API1 the mail is getting send with th

  • Try to use dynamic sql connection for additioal data for xml publisher

    I understand that the xml publisher is using template to merger the xml data output (say from Oracle report). We have some Oracle seeded report and do not wish to modify these report, but we do need to add additional data to these reports. In the pas