Creation of XML dynamically helppppppppppppp

hello all
i had developed an application in java .corresponding to that i want
to create xml that take its value of attributes
dynamically
Can anybody help me out how to proceed to this problem
thanks in advance
bye

You can look into JAXB, if you are comfortable with XML Schema and automatic code generation. If not, you can write your own parsing and serialization routines via Xerces and Xalan (available at xml.apache.org). Finally, I am sure there are a number of open source projects that have their own XML serialization and de-serialization schemes. Search www.sourceforge.net.
- Saish

Similar Messages

  • Issue in Creation of XML file from ABAP data

    Hi,
    I need to create a XML file, but am not facing some issues in creation of XML file, the in the required format.
    The required format is
    -<Header1 1st field= u201CValueu201D 2nd field= u201CValueu201D>
       - <Header2 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 10 fields>
              <Header3 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
              <Header4  1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 4 fields/.>
               <Header5 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
          </Header2>
       </Header1>
    Iu2019m using the call transformation to convert ABAP data to XML file.
    So please anybody can help how to define XML structure in transaction XSLT_TOOL.
    And one more thing, here I need to put the condition to display the Header 3, Header 4, Header 5 values. If there is no record for a particular line item in header 3, 4 & 5, I donu2019t want to display full line items; this is only for Header 3, 4 & 5.
    Please help me in this to get it resolved.

    Hello,
    you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
    If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
    Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
    Regards Otto

  • Creation of XML

    Till now i was working on my test server and creation of XML file seemed to be ok.
    Now i shifted to live server and suddenly XML creation is a problem. I do not have write access problem as the file is getting created and also root element is getting created. But after root nothing is going inside the file.
    I do not understand why suddenly server is behaving like this, but can anybody give clues ? Is there any settings required ?
    I am on Tomcat 5/Struts framework and using DOM to create file.
    regards
    Manisha

    i am a newbie in xml
    I want to know how to crate xml that takes value
    from the application
    Waiting for your reply
    thanking u
    take care
    byeAre you talking about saving objects to XML files?
    That can easily be done with XMLEncoder and XMLDecoder. Useful when you're too lazy to write a class to input and output to binary files... Like me :D

  • Anychart bar graphs - Can we map colors to customer IDs in JSON/XML dynamically?

    Hi,
    We are using the Anychart bar graphs to show our customers data. We need to be able to map colors to customer IDs, so that anytime we use a bar chart a customer will aways be the same color.
    Example: if one view shows 3 customers  (cust ABC is maroon, XYZ is yellow and DXA is blue) and a second view, because of the data, shows 12 customers, that if 2 that are in the first view are also showing they would have the same colors as they did in the first view (cust ABC is still maroon and cust DXA is still blue and if XYZ is not in the second view then Yellow would not be present)
    Is there a way to map the colors to the customers in an XREF table then build the JSON or XML dynamically and use that in the graph each time?
    I have found the Anychart site and it looks like it is possible but was wondering if anyone has done it? Otherwise it looks like it is going to be to time consuming to read everything I would have to read.
    Thank you,
    Bill

    thanks for passing this link Stijin,
    http://oraclebizint.wordpress.com/2007/09/25/oracle-bi-ee-10133-and-mapviewer-step-by-step-integration-phase1/
    http://oraclebizint.wordpress.com/2007/09/26/oracle-bi-ee-10133-and-mapviewer-step-by-step-integration-phase2-phase3/
    i already used this, but we need at least full explanation in how to build OBIE presentations layers and its physical and logical datas , and how to write codes using Java scrips and html codes using OBIE presentation on statistics text.
    if any of you just can link me link regarding to workshop lab's documentations and files regarding to OBIEE integrated to Mapviewer.
    with fully respect and love to you all,
    Yusuf Felemban

  • Jar package for XML Dynamic News

    Where I will find *.jar package for XML Dynamic News?

    Hi,
    You have downloaded the old sample application. The latest XML Dynamic News application is certified for Oracle 9.2.0.2 database which uses Oracle XML DB and J2EE features. For the latest application sample jar to be uploaded, we are waiting for the patch release of database on OTN.
    We are sorry for the inconvenience caused and will keep you updated about the sample application release.
    Thank you.
    Savitha.

  • Dynamic creation of xml node

    Hi there
    I can't quite figure out how to add a node based on a passed
    variable value
    If I hard code it as can be seen in the line of code
    commented out - it works.
    But if I try to pass a string, it doesn't work
    public function addNodeToXML(passedNodeName:String):void {
    //_qualificationSummaryScreenXML.appendChild(<pupil
    />);
    _qualificationSummaryScreenXML.appendChild(passedNodeName);
    This is the call to the function
    addNodeToXML("<pupil />");
    Would be very grateful if someone can help me fix this
    Thanks
    Paul

    Hi Suman,
    I would suggest that you ask questions about ABAP WD in the forum for ABAP WD.
    Kind regards,
    Ulrich

  • Help in creation of XML file for IDOC postings

    Hi All,
    Need help if anyone has knowledge/experience in creating XML files for IDOC processing.
    We need to design an input file (in XML format) for creation of IDOCu2019s for purchase Invoices through Interface.
    We have an existing input file, which is working correctly.  We are trying to modify this existing input file for a new Tax Code (Non-deductible inverse tax liability).   This tax code is working fine for manual postings.   But, through IDOC, tax postings are not correctly triggering.
    Could you please confirm if any one has experience on this, so that I can share more details for resolving.
    Thanks & Regards,
    Srini

    Hello,
    you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
    If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
    Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
    Regards Otto

  • Please help, Urgent ! creation of xml from servlet

    Hi,
    I have to write a servlet that takes user input from a html form and creates a xml file from those input parameters and transform that xml file into html form using xsl program. Whenever the user adds new values to the form this newly generated xml file should overwrite the previous xml file content.
    Can anybody please tell me how to create a xml file from user input in servlet so that I can pass it to a transformer object.
    Thanks in advance!

    why write out the XML, it seems to be only a temporary file?
    Doing as you suggest is extremely risky for when several requests come in at the same time you can never be sure that the file contains the data that you just wrote to it.
    Better to keep the XML all in memory.
    For the XML creation, look no further than DOM. Most XML parsers provide excellent DOM support, I'll be using Xerces 2 here as that's what I'm most familiar with.
    Document doc = new DocumentImpl();
    Element root = doc.createElement("mydoc");
    * fill in the XML
    Element elem = doc.createElement("focuscontrol");
    elem.appendChild(doc.createTextNode("alert('loaded')"));
    root.appendChild(elem);
    elem = doc.createElement("data");
    elem.appendChild(doc.createTextNode("Hello World!"));
    root.appendChild(elem);     
    doc.appendChild(root);     creates an XML Document object like this:
    <?xml version="1.0"?>
    <mydoc>
      <focuscontrol>alert('loaded')</focuscontrol>
      <data>Hello World!</data>
    </mydoc>This XML Document object can be easily passed to an XSLT processor to turn it into HTML.
    String path = getServletContext().getRealPath("/WEB-INF/xsl/");
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Source xslSource = new StreamSource(new File(path, "myxslfile.xsl"));
    Source xmlSource = new DOMSource(doc);     
    t.transform(xmlSource, new StreamResult(out));where out is the PrintWriter for the servlet and your XSL file is stored in yourwebapp/WEB-INF/xsl (thus out of sight of prying eyes).
    I leave it up to you to find an encoding of your request parameters into the generated XML that you like.

  • Creation of XML !DOCTYPE DTD Validation line

    Hello all!
    I've been working in the creation of an XML File via Abap Objects.
    <b>if_ixml</b>          For Document Header
    <b>if_ixml_document</b> For Document Header
    <b>if_ixml_element</b>  For Nodes and their Child Nodes
    I have already developed the code for creating the XML File.
    I think I have it completed, but I don't know how to insert the line that starts with <!DOCTYPE>.
    This line validates all the DOM tree structure against a DTD File.
    I've been searching for an example of how to do it, but I dind't find anything
    Wich is the proper Class, object or method that I have to implement for this topic?
    The Line I have to post on the XML file is one like this:
    <!DOCTYPE e-billing-payable PUBLIC "-//BxxxxFxxxxx.com//DTD Ebilling Enterprise to Bank 1.0//EN" "https://hb.xxx.com.ar/cobranzasonline/ebillingE2B.dtd">
    Thanks in advance,
    Claudio.

    Thanks Sandra, I was succesfull in getting the doc type but here is the format that I need
    <!DOCTYPE gsafeed PUBLIC "-//Google//DTD GSA Feeds//EN" "gsafeed.dtd">
    If I try to use entity declaration , it dosen't let me without passing the SYSTEM paramater. Is there any method within if_ixml_document_type or outside, that would help me pass the attributes to get in the below format.
    <!DOCTYPE rootElement PUBLIC "PublicIdentifier" "URIreference">
    Thanks
    Ganesh.S

  • Create XML dynamically from schema and Java bean

    Hi,
    I'm looking for suggestions on the best approach to create an XML file programatically from a schema and Java bean.
    The schema used is not fixed and may vary with each request so a dynamic way to create the XML is required.
    Is there an API available that allows me to achieve this easily? Any help would be appreciated to point me in the right direction.
    Thanks.

    XMLBeans or JAXB should work for you.
    - Saish

  • Efficient way for Continous Creation of XML Content?

    Hi
    I have a requirement of creating xml content from the data extraced from a udp packet.
    As the packet arrives, i have to generate appropriate xml content from them and keep in the same single xml file.
    Problem:
    Since the xml file is not a flat file, i can't just append the new contents at the end. So if i have to write into xml file, Each and Every time i have to parse the content as a packet arrives and insert the new content under appropriate parent. I think this is not the most efficient way.
    Every time parsing the file may affect cpu time and as the file grows in size, the memory will also be a constraint.
    Other options i could think of
    * Hold the XML Document Object in memory until a certain event like timeout for receiving packet and write into the xml file at oneshot.
    * Serialize the objects containing the extracted packet content to a temp file and after some event, parse and create the xml file at oneshot
    Which is the efficient way or is there any design pattern to handle this situation? I am worried about the memory footprint and performance on peak loads
    I am planning to use JDOM / SAX Builder for xml creation.
    Thank you...

    Lot's of "maybe" and "I think" and "I'm worried about" in that question, and no "I have found" or "it is the case that". In short, you're worrying too much about problems you don't even know you have. XML is a verbose format anyway, efficiency isn't paramount when dealing with it. Even modestly powered machines can deal with quite a lot of disk I/O these days without noticeable impact. The most efficient thing you can do here is write something that works, and see if you can live with the performance

  • 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?

  • Creating XML dynamically

    Hi,
    I need to create XML which follows this exact structure:
    <root>
        <node>
            <row>
                <item>item01</item>
                <item>item02</item>
            </row>
            <row>
                <item>item03</item>
                <item>item04</item>
            </row>
            <row>
                <item>item05</item>
                <item>item06</item>
            </row>
        </node>
    </root>
    but I need to do it dynamically, so I am doing this:
    var xml:XML = <root></root>;
    xml.appendChild(<node></node>);
    xml.child("node").appendChild(<row></row>);
    xml.child("node").child("row").appendChild(<item>item01</item>);
    xml.child("node").child("row").appendChild(<item>item02</item>);
    xml.child("node").appendChild(<row></row>);
    xml.child("node").child("row").appendChild(<item>item03</item>);
    xml.child("node").child("row").appendChild(<item>item04</item>);
    and I get this error:
    TypeError: Error #1086: The appendChild method only works on lists containing one item.
        at XMLList/http://adobe.com/AS3/2006/builtin::appendChild()
        at xml_fla::MainTimeline/frame1()
    Any suggestions as to what I can do?  I can change the format as the script on the server is expecting this format.
    I have tried using SimpleXMLEncoder and tried creating the XML from an Object but neither of these helped.
    Any suggestions warmly welcome...
    Thanks

    try:
    var xml:XML = <root></root>;
    xml.appendChild(<node></node>);
    xml.child("node").appendChild(<row></row>);
    xml.child("node").child("row").appendChild(<item>item01</item>);
    xml.child("node").child("row").appendChild(<item>item02</item>);
    xml.child("node").appendChild(<row></row>);
    xml.child("node").row[1].appendChild(<item>item03</item>);
    xml.child("node").row[1].appendChild(<item>item04</item>);

  • Portal Domain creation - config.xml

    Folks,
    I created a portal domain using weblogic 8.1 GUI configuration wizard.It wlp.jar
    file as a template to create this one.
    After creating this, I opened config.xml file of new portal domain and it have
    JDBC connection pool setup for point database.I do not want to have this in my
    config.xml file and do not want to remove this manually because of our automation.
    How can I resolve this?
    Thanks
    - Spider

    if you don't want the JDBC Connection pool ion your domain ,
    please use the config Wizard to configure JDBC connection pool with database
    other that pointbase at the time of creation.
    otherwise using the wizard, you change the properties of exisiting domain.
    Karthi.
    "SpiderMan" <[email protected]> wrote in message
    news:3f74b601$[email protected]..
    >
    Folks,
    I created a portal domain using weblogic 8.1 GUI configuration wizard.Itwlp.jar
    file as a template to create this one.
    After creating this, I opened config.xml file of new portal domain and ithave
    JDBC connection pool setup for point database.I do not want to have thisin my
    config.xml file and do not want to remove this manually because of ourautomation.
    >
    How can I resolve this?
    Thanks
    - Spider

  • Making changes in web.xml dynamically

    Hi all,
    I have a requirement in which i need to redirect request to com site if it is from desktop browser and to WAP site if request for wap site or from a mobile device
    Have servlet ready doing it but presently taking only to two harcoded URLS of .com and .mobile sites.in web.xml.
    Now i want dynamic changes in web.xml through a servlet to changes those URLs to respective request.
    Thanks in advance,
    dcosta_halo

    The web.xml file is only a data storage file. When a Java Web Server starts up, it read the web.xml file and creates the appropriate objects that live in the JVM and manage parts of the applications hosted by the server. Any changes to the web.xml data file while the server is running are lost once the server is turned off. You need to figure out another design, possibly having the servlet read a database table to get URL strings.

Maybe you are looking for