Generation of XML file out of iView

Hi,
Is it possible to generate the xml file with the content of the actual iView? If yes, then please tell me how it is possible?
Thanks in advance,
manish

Hi Manish,
Did you check the <b>java.beans.XMLEncoder</b> class? It has a method
writeObject(Object o)
which converts any object into XML.
Greetings,
Praveen Gudapati
p.s. Points are always welcome for helpful answers

Similar Messages

  • Generation of XML file from Java objects using castor

    I have the following java file(Customer.java).
    public class Customer
         private String ID;
         private FirstName firstName;
         private MiddleName middleName;
         private LastName lastName;
         private ArrayList address;
         public ArrayList getAddress() {
              return address;
         public void setAddress(ArrayList address) {
              this.address = address;
         public FirstName getFirstName() {
              return firstName;
         public void setFirstName(FirstName firstName) {
              this.firstName = firstName;
         public String getID() {
              return ID;
         public void setID(String id) {
              ID = id;
         public LastName getLastName() {
              return lastName;
         public void setLastName(LastName lastName) {
              this.lastName = lastName;
         public MiddleName getMiddleName() {
              return middleName;
         public void setMiddleName(MiddleName middleName) {
              this.middleName = middleName;
    Using castor i have created an xml file(customer.xml) which has the following format.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <customer ID="fbs0001">
    <FIRSTNAME>Fred</FIRSTNAME>
    <MIDDLENAME>B</MIDDLENAME>
    <LASTNAME>Scerbo</LASTNAME>
    - <ADDRESS>
    <FIRSTLINE>No 18, Sheshadri road</FIRSTLINE>
    <SECONDLINE>Gandhinagar Bangalore</SECONDLINE>
    </ADDRESS>
    - <ADDRESS>
    <FIRSTLINE>ITPL</FIRSTLINE>
    <SECONDLINE>Whitefield Bangalore</SECONDLINE>
    </ADDRESS>
    </customer>
    I have used a mapping file to get this output.Is there a way where i can get the output xml in the following format without changing the Java object structure.If yes then please suggest how this can be done.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <customer ID="fbs0001">
    <FIRSTNAME>Fred</FIRSTNAME>
    <MIDDLENAME>B</MIDDLENAME>
    <LASTNAME>Scerbo</LASTNAME>
    </customer>
    <ADDRESS>
    <FIRSTLINE>No 18, Sheshadri road</FIRSTLINE>
    <SECONDLINE>Gandhinagar Bangalore</SECONDLINE>
    </ADDRESS>
    - <ADDRESS>
    <FIRSTLINE>ITPL</FIRSTLINE>
    <SECONDLINE>Whitefield Bangalore</SECONDLINE>
    </ADDRESS>
    I mean the output xml file should have the address as a separate tag not withing the root tag customer.

    Hello,
    Castor's own discussion groups might be able to point you to the solution you're looking for (if this use case is possible using Castor).
    Oracle has its own object-to-XML mapping tool that is part of the TopLink product. It allows you to map existing objects to an existing XML Schema. This can be done visually using the TopLink Workbench, or programmatically using the TopLink APIs. TopLink OXM also supports the JAXB specification.
    Using TopLink OXM to get the desired XML result I would recommend the following. Map the Customer and Address classes to XML, but don't map the relationship between Customer and Address. Then make the calls to the marshaller something like the following:
    marshaller.marshal(aCustomer, System.out);
    for(int x=0; x<aCustomer.getAddress().size(); x++) {
         marshal(aCustomer.getAddress().get(x), System.out);
    Example - Using TopLink OXM to map an existing object model to an existing XML Schema:
    http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp4/howto/ox/index.htm
    For more information on TopLink object-to-XML mapping:
    http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp4/objectxml/index.html
    -Blaise

  • Generation of Xml file with java output

    Hi i m new to xml and java combination. I have a name value pair kind of output returning from java program. I want to generate the new xml file with the data. Could some one help me out in generating xml file with the data. Could anyone send me the java code that does this task.

    Let me know which parser are you using currently for reading xml files so that i assist you. For now, you can refer to STAX Parser API under this link
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP3.html

  • Generation of xml file from java code

    hi,
    I want to manipulate data in a xml file with java code.I have read data from xml file and also changed it. But i am unable to covert it again in xml file from java code. Can you please tell me how i can do this?

    Let me know which parser are you using currently for reading xml files so that i assist you. For now, you can refer to STAX Parser API under this link
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP3.html

  • Generation of XML file using DMEE format tree

    Hi Experts,
                     Can you please provide all the steps to generate a XML file using a DMEE format tree.
    Thanks in adavance!!!
    Regards,
    Vishal.

    Hi,
    you can do it exaclty the same way like creating ordinary flat file.
    You can find also some examples made by SAP. Search format tree with this pattern: XML

  • How to generate XML file out of ....

    I want to know, how to obtain a XML file as a output (in java), where in, the input is an object that contains number of enties in it.
    I found MXXMLParser doing something similar to, what I am interrested in. But it requires an comma seperated file as input.
    Please help me on this ASAP.
    Regards

    Did you check JAXB?

  • How to get XML files out of activity diagrams of UML

    Using Rational Rose I have developed a model now I want a way to get XML file for each activity diagram of the model built. This XML file will be the input file for Project Cleveland which instantiates the services according to the documentation in this XMl file

    In the Photos mode go to the View menu and uncheck Event Titles. That will leave you with only thumbnails displayed in the Photos view. However, if you close from that mode and reopen the opening time will be slower since iPhoto has to read and render all of the thumbnails. It can get rather long.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.≤br>
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Parsing .xls(excel) file and creating a .xdat(xml) file out of it

    Hi All,
    need some tips on a task i am trying accomplish for some days now.
    I have a excel file, in which I have 10 columns with 40-50 rows of data.
    I have a xml structure in mind, in which I want to put all these data from excel file. But till now I haven't understood exactly how I should go about it step by step.
    Should I first parse the excel file and save each row (with the column names) in a list, and then read through each row and insert them in the xml format i have planned?
    And how do I open a .xdat data and tell my program to insert the data in the sequence of sets I want them to be saved?
    I know it's a pretty newbie question ... but will appreciate any help and tips provided. Would help me a lot to learn this new type of task.
    Thank you.
    with best regards,
    Newbie

    If you are using JAXB you unmarshall to read the xml. Then you marshall to write.
    So what you do is:
    1) Unmarshall your xml document. This means you now have your xml as Java objects.
    2) Read through the Java objects using loops, etc making any changes to the values. I think here you want to add values, so you can set your values
    3) Now in memory you have your new xml thats been updated, so you can marshall it (save it)
    I'd recommend a JAXB tutorial. But the basic steps are:
    1) Create an xml file and insure its valid
    2) Use a free online utility (http://www.hitsw.com/xml_utilites/) to convert the xml into an xml schema (xsd)
    3) Use xjc from the jaxb jar and run it over the xml schema (the command i use is xjc myxmlfile.xsd -p com.example
    4) Step 3 above creates all the java classes for you to use so then you can unmarshall. Process. Then marshall
    This is just a high level. I might have missed something, but the jaxb tutorial is really good and that's how I learned the process.

  • Feasibility to send XML file out based on approved confirmation

    Hi XML experts,
    We have SRM 5.0 with extended classic scenario.  For a service PO, a service entry sheet/confirmation is created in SRM.  It has a one-step approval scenario.  After approval, we would like to send the service entry sheet back to the external agency through XML in HR-XML format.  Any procedure available for this?
    regadrs,
    SRM support team

    Hello Sai,
    I won't be too expecting using Flex. The layout generated need not necessarily be compatible with the SAP ALCD.
    Although, it must be possible to generate a pdf dynamically because every element used in the form layout is stored as a xfo-file (e. g. button.xfo) within the installation directories. Have a look! So, you can assemble a form layout based on the xfo-elements completely dynamically.
    So, you need an empty layout. You can load the layout by cl_fp_wb_form=>load and form->get_layout( ). Change it, store and generate by function FP_FORM_GENERATE. But it will need some efforts!
    Good luck!
    Regards,
    Alexander

  • Portal iviews xml files

    Hi,
    Mayby anybody here knows where do the portal iviews xml files are saved in the server?
    Thanks.
    Promise to award points...
    Ruthie.

    Dear Maksim,
    I have a problem here with sap transaction iview - I opened an Oss and I was asked to send them all xml files of the iviews. As for now - I asked them where can I find it.
    Thanks for your help.
    Ruthie.

  • Getting question marks in html output when xml file has an mdash or rsquo

    I have a java servlet that gets an xml file out of ifs, applies
    a style sheet to it, and sends it to the browser as html.
    I have:
    DOMparser parser = new DOMParser();
    parser.parse(XmlUrl);
    The characters ampersand, greater than, less than, and
    apostrophe work fine.
    HOWEVER, When the xml file has an mdash(&#X2014) or a rsquo
    (&#x2019) in it, my html output in IE shows up with question
    marks where these characters are supposed to be.
    Does anyone know what I can do to fix this? I don't understand
    why it would work with some special characters and not others?

    UPDATE
    Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
    Thanks.
    Fede.

  • Download RSS feed as xml file from Sharepoint Online using PowerShell

    Hello
    Our company sharepoint (Office 365) contains also several RSS feeds.
    How it is possible to download xml file out of this feed (website) using PowerShell?
    I can authenticate with sharepoint using CSOM but do not what to do next.
    As service user is not administrator I cannot use "SPOService".
    This script works OK for standard website, but not for Sharepoint.
    $doc = New-Object System.Xml.XmlDocument
    $doc.Load("http://www.{CompanySite}.com/feed/")
    $doc.save("C:\temp\feed.xml")
    I am getting this error when using for company Sharepoint:
    "The remote server returned an error: (403) Forbidden."
    Thanks for your time considering this question.
    Jozin

    Hi Scott,
    thanks for advice.
    Combination of WebClient and Sharepoint Credentials is working OK:
    $client = New-Object System.Net.WebClient 
    $client.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($User, $SecurePassword)
    $client.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
    $client.DownloadFile($SiteURL, $file)

  • Inserting a value from page field into an xml file

    Hi there,
    I have added a field 'Comments' on a create vacancy page.
    There are other fields on that page and the values from those fields are getting stored in an xml file.
    This xml file is getting stored in TRANSACTION_DOCUMENT column of table HR_API_TRANSACTIONS.
    Is it possible to add the value from the field (that I've added on the page) into the same xml file?
    If yes, please tell me how
    and if no, tell me what should I do to store that value.
    Regards,
    Gaurav.

    Hi Gaurav,
    You need to check in seeded files for the logic of generation of XML file and setting it in DB column. May be in PLSQL API this code would exist.
    Once you get that logic you can append your column value in XML tag (need to create new tag) if you are allowed to modify seeded API. Otherwise use free additional attributes of the table.
    Hope I am clear.
    Regards,
    Mukesh Uchaniya

  • Converting text String to XML file data

    need some guidance. I have to create a XML file of a huge Text File.
    I am parsing the text file according to relevance and passing a set of data each element and attribute seperated by "_".
    I need to create to Xml file out this. It has to be current process as I need to keep on adding new elements and attributes.
    e.g.
    Passing this string
    String temp("Name_Age_Birthdate_Birthplace_Place_teleNumber");
    Need to add this to XML of format
    <Directory>
    <Person>
    <Name>
    <Age>
    <Birthdate>.....
    </Person>
    <Person>
    </Person>
    </Directory>
    The problem not all attributes may be present at some time..
    e.g.
    the person's age may be absent some times.. during that time the xml file should look like <Age/>
    I will need to keep on updating Person list concurrently after the file has been created..
    Need Urgent guidance.. I am still New to java
    A guidance code or link is awaited..
    Thanks.. a Lot

    Do you need to stick to the XML support that comes with Java 1.4 or can you use Third-Party stuff? I'm asking, 'cause I think JDOM is much easier to use for a newbie than the build-in XML API ... and it comes with a VERY easy to use class XMLOutputter that creates XML files!
    Take a look at JDOM:
    http://www.jdom.org/

  • Construct XML files in Java

    Hi,
    Can you any give me some third party libraries widely used to create XML file out of trading information ?
    Thanks

    XML handling has been available in core Java since v1.4.
    But if you stick to a third party library, JDOM is fine.
      private static String transform( org.w3c.dom.Document doc ) throws Exception
        javax.xml.transform.TransformerFactory      tf = javax.xml.transform.TransformerFactory.newInstance();
        javax.xml.transform.Transformer             t = tf.newTransformer();
        javax.xml.transform.Source                  source = new javax.xml.transform.dom.DOMSource( doc );
        java.io.StringWriter                        sw = new java.io.StringWriter();
        javax.xml.transform.Result                  result = new javax.xml.transform.stream.StreamResult( sw );
        t.setOutputProperty( javax.xml.transform.OutputKeys.ENCODING, ENCODING );
        if ( OMIT_XML_DECLARATION )
          t.setOutputProperty( javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes" );
        t.transform( source, result );
        String      ret = sw.toString();
        return ret;
    }

Maybe you are looking for

  • Installed ssd on new macbook but getting a grey folder with a question mark?

    Hi, I bought a new macbook pro, late 2011. Installed aftermarket SSD myself. Switched mac on and i get a question mark in a grey folder with a white background. I rang Apple and they said they mac cannot find the operating system. Any help?

  • When does proactive caching make sense?

    Hi all! An standard pattern for multi-dimensional cube is to have one cube doing heavy time-consuming processing and then synchronize it to query cubes. In this setup, will pro-active caching makes sense? Best regards Bjørn B. D. Jensen

  • HELP:"java.lang.IllegalArgumentException"!!!!!!!!

    Good morning, I'm new in java and i'm trying to develop a graphic interface for an agent that i use in the platform Madkit...In brief i manage to see my interface however I have always this message: Agent launch exception:java.lang.IllegalArgumentExc

  • Upgrading my Broadband package

    Hello, My Broadband service was recently switched over from talktalk to BT. I am currently looking into upgrading from the current package that is being received at my residence. The current package in my house at the moment is BT total broadband opt

  • Problem connect to a wifi network PEAP

    Hi Since OS 2.1 on my playbook, I cannot connect to my PEAP with MSCHAPV2. It was working on OS 2.0. I'm now using OS 2.1.0.1314 and the problem is still here. The playbook connect to the wifi, when I open a browser I must login with my user name, bu