Building XML dynamically? Is it possible.

How do I build an XML Document dynamically.?
I am wrting MIDP Applications (applications for the Mobile
device) and I am required to send requests to the server
in XML Formats.I have multiple requests to be sent to the
server in XML and then I receive XML responses from the server
which i need to parse.
Now,if I store all the required requests in a Class,that are needed to be sent to the server,I am taking a lot of space of the cell phone.
How can I create an XML string dynamically that is sent to the
server as and when required.
Please can any one respond?
AJAY
ajay [email protected]

Hi there,
So is it possible for me to create an XM file on the fly.?
For example: I need to send an xml file to the server
For this I have a class called RequestHandler having a method called
sendRequest1(),sendRequest2(),sendRequest3() etc etc
public class Request{
public void sendRequest()
String req1 = "<xml.........>
public void sendRequest2()
req2 = "<xml......>";
public void sendRequest3()
req3 = "<xml...>";
This way I have a lot of xml file format in each method.
Please explain as to how I can create the XML file required
to be sent for each request to the server on the fly.
Storing this class with all the XML file formats takes up a lot
of space on the MIDP device...
Thanks for yr response.
Ajay

Similar Messages

  • How I build XML dynamically?

    Hello,
    I'm new to JAXP and I have this problem. Perhaps someone can help me:
    I have a database. I get data with many select-statements over some tables.
    Now I want to get one XML-String/-File with the data. The Problem is, I have to cascade these data.
    I have to build dynamically the XML-Tree.
    Have someone an example?
    Or do you know a good tutorial or website for jaxp?
    Thanks!!!

    from my database I get an resultSet and no XML-Data.personnaly, i wrote a class that takes every row of the resultset, and add a <row> </row> tags set to a string buffer.
    in the <row> tag, I add a <collumnName> tag for each collumn, collumnName corresponding to the real collum name. You can easily get the collum names of an resultset...
    This method works fine, but it is important to work with a stringbuffer, because if you make String s+="next" several times, you lose a large amout of time.
    For example, a 4500 rows with 2 collums resultset containing string values in the fields makes 40 seconds to be build with the String objects, and 0.1 seconds with a stringbuffer...
    Yours, Ga�l.

  • More than one ANT Build-Script "build.xml" in a JDev Project?

    Hi,
    were using JDev 10.1.3.3 with our Projects in which i am trying to inject the code coverage tool "Cobertura".
    We want to handle Cobertura through ANT-Targets, so we have to set up an .XML-Buildscript.
    But we already have a Build.xml to cover our deployment needs.
    I don't want to put the cobertura-targets into our Build.xml - would be a mix of purpose to me...
    Instead of having one big .xml, i wanted to have "Build.xml" and "Cobertura.xml", but when generate the latter and put in the ANT-Project it isn't recognized as an ANT-Script, but as an ordinary XML.
    With new-->Ant-->buildfile i can only generate the "Build.xml".
    Is it possible to convert a regular XML into an Ant-Script, so that JDev would recognize them?!
    regards,
    Henning
    Edited by: Haymaker84 on 03.12.2008 03:00

    whoops...
    i was able to generate another buildscript with the standart dialog!

  • Replaceregexp tag in build.xml to pass the value dynamically

    Hi,
    First of all I apologizes as this is not a java question, but sure you guys can help me out. In my build.xml, i have some thing like this:-
    <target name="all"
    depends="compile,clean_classes,replaceTemplates"/>
    <target name="compile"
    depends=" create.dir,compileclasses,jar,run"/>
         <target name="clean">
         <delete dir="${build.dir}"/>
         </target>
    <target name="clean_classes">
    <delete dir="${classes.dir}"/>
    </target>
    <target name="create.dir" depends="clean_classes">
    <mkdir dir="${classes.dir}"/>
    </target>
         <target name="replaceTemplates" depends="clean_classes">
              <replaceregexp file="${sourcefiles}/com/test/BusinessService.java"
                                  match="%%VALUE%%"
    replace="1"/> // this will be fetched dynamically from .properties
    </target>
    In my BusinessService.java,
    I have a String strValue = "%%VALUE%%";
    When i ran the build.xml, the strValue is not replaced with the value "1" as been specified in the build.xml. It seems that everything is fine the class file name path, etc. But some how it is not displaying the value "1" inplace of the placeholder? Please clarify.
    One more question on this:-
    If the value "1" is displayed for strValue variable, and if i have updated the value in the build.xml replace="2" for <replaceregexp>, in such case the updated value "2" wont be populated. Hence what is the approach we need follow, whether we need to create another folder and copy the "src" code there and make the changes in it like instead of:-
    <target name="replaceTemplates" depends="clean_classes">
              <replaceregexp file="${sourcefiles}/com/test/BusinessService.java"
                                  match="%%VALUE%%"
    replace="1"/> // this will be fetched dynamically from .properties
    </target>
    the new one will be like:-
    <target name="replaceTemplates" depends="clean_classes">
              <replaceregexp file="*${build}/*src/com/test/BusinessService.java"
                                  match="%%VALUE%%"
    replace="1"/> // this will be fetched dynamically from .properties
    </target>
    Please clarify.
    Thanks

    Don't be so impatient and don't multipost! I've deleted your other thread about the same topic.

  • 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

  • Why not all jars picked up by ojdeloy and how to generate build.xml from command line and not JDEV GUI - quick question

    Hi All
    We have 11.1.1.7 ojdeploy to compile our app.
    We notice in the log that not all jars are used in classpath arguments when we explicitly set them up for compilation.
    eg:
      <path id="classpath">
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/commons-el.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/jsp-el-api.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/oracle-el.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/a.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/b.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/c.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/d.jar"/>
    </path>
    Log Output -
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/bin/javac
    [ora:ojdeploy] -g
      [ora:ojdeploy] -Xlint:all
      [ora:ojdeploy] -Xlint:-cast
    [ora:ojdeploy] -Xlint:-empty
      [ora:ojdeploy] -Xlint:-fallthrough
      [ora:ojdeploy] -Xlint:-path
      [ora:ojdeploy] -Xlint:-serial
      [ora:ojdeploy] -Xlint:-unchecked
      [ora:ojdeploy] -source 1.6
      [ora:ojdeploy] -target 1.6
      [ora:ojdeploy] -verbose
      [ora:ojdeploy] -encoding Cp1252
      [ora:ojdeploy] -classpath
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/resources.jar:
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/rt.jar:
      [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/jsse.jar:
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/a.jar"/>
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/c.jar"/>
    1- Is it because it depends on how jpr or jws are configured ?
    2- How can we automatically generate a build file of the application from command-line (as opposed to using Jdev IDE to click to generate a build.xml) ?

    The first  warning is happening because you're stating drivers for input devices without need. You haven't disabled hotplug so evdev gets used instead of kbd. This is normal, and you should change the driver line from kbd to evdev so that whatever options (if any) you've specified for the keyboard get parsed.
    The second warning is about you not installing acpid.
    The third I have no idea about, but look at the synaptics wiki. None of the (WW) are related to your video card.
    And every card that has 2 or more output ports show up as "two cards". You also don't need to specify the pci port in xorg.conf. edit: this is the general case with laptops, might be different for desktops.
    When I do lspci -v I get:
    00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at dfe80000 (32-bit, non-prefetchable) [size=512K]
    I/O ports at d0f0 [size=8]
    Memory at c0000000 (32-bit, prefetchable) [size=256M]
    Memory at dff00000 (32-bit, non-prefetchable) [size=256K]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0
    Memory at dfe00000 (32-bit, non-prefetchable) [size=512K]
    Capabilities: <access denied>
    And it doesn't matter if it errs in trying to sli up with it self. That's just not a possibility.
    Last edited by gog (2009-10-15 23:59:49)

  • Adding environment variable in build.xml(ANT)

    Hi,
    I need some information Regarding ANT,
    the problem is i have to add a property file in build.xml (as a environment varialble) so that i can read it in my java code. as
    System.getProperty("").
    Please sugggest me how to set environment variable in build.xml(ANT)
    Thanks
    Edited by: fdfddf on Apr 7, 2008 3:20 PM

    Hi Jakain, yep thanks for your information but my manager wants that way to do..
    he wanted me to set property file as a environment file using build.xml as this property file changes dynamically..
    can you suggest me

  • Build.xml in weblogic 7

    Hi.
    I am trying to upgrade from wls 6.1 and wlp 4.0 to weblogic platform 7.0 i have
    completed migration of all files, but cannot find the 7.0 versions of the build.xml
    and corresponding files, nor can i find any reference to these files in the documentation.
    Does anyone have any idea how to convert these 6.1/4.0 specific files to 7.0?
    Thanks.

    Please post this to the EJB beta newsgroup.
    -- Rob
    feroze ashfaq wrote:
    Hello,
    I am getting a problems with ejb-jar.xml file while trying to build it in weblgic
    7.0.I am always getting an error that ejb-jar.xml cannot be processed .Please
    help me why this problem is comming.In the classpath i have given java home as
    jdk1.4.Let me know as soon as possible.

  • AIA Installing and Deploying Demo Application failed:Build.xml not found

    Hi,
    i am trying to install demo application using following steps
    Extract Foundation Pack Demo under <AIA_HOME>.
    If not already done so, set environment variables:
    For Linux (bash shell)
    source <AIA_HOME>/aia_instances/<aia_instance>/bin/aiaenv.sh
    For Windows
    Navigate to aiaenv.bat located in <AIA_HOME>\aia_instances\<aia_instance>\bin
    Run aiaenv.bat
    You may have to assign higher memory values in your JVM parameter settings for demo to deploy if you have not set the maximum possible value already. Use the following three steps as guidance to configure JVM parameters:
    Navigate to <Middleware home>\user_projects\domains\<domain_name>\bin
    Update the following parameter in the setSOADomainEnv.sh (for Linux) and setSOADomainEnv.cmd (for Windows) file:
    USER_MEM_ARGS=""-Xms2048M -Xmx2048M -XX:PermSize=256M -XX:MaxPermSize=512M -Xmn1228M -XX:SurvivorRatio=10""
    Note: These are recommended values while using Sun JVM. Actual values that you set depend on your system configurations. When running on dedicated hosts, you can set the JVM heap size as high as possible. Higher value results in better performance. However this number is constrained by the operating system's addressable memory space.
    Restart SOA server
    Run the deployment script:
    At the command line prompt, run the following command for your platform:
    For Linux:
    cd $AIA_HOME/samples/AIADemo/config
    ant -f deployDemo.xml
    For Windows:
    cd %AIA_HOME%\samples\AIADemo\config
    ant –f deployDemo.xml
    while runiing the deployment script it showing build.xml not exist..
    Error Details
    D:\Soasuite\oracle\Middleware\SOASuite11gR1PS4\oracle_common\samples\AIADemo\con
    fig>ant -f deployDemo.xml
    Buildfile: build.xml does not exist!
    Build failed
    Any suggestions
    Thanks in advance

    Hi
    This is the location i am having my installation because in this location only MY AIA instance got created.
    Here i am pasting my env variable setup in aiaenv.bat file
    #set environment variables
    set AIA_HOME=D:\\Soasuite\oracle\Middleware\SOASuite11gR1PS4\oracle_common
    set MW_HOME=D:\\ORACLE\Middleware
    set SOA_HOME=D:\\ORACLE\Middleware\Oracle_SOA1
    set JAVA_HOME=D:\ORACLE\Middleware\jdk160_24\jre
    set AIA_INSTANCE=%AIA_HOME%/aia_instances/AIAinst1
    kindly help...

  • Ant: How to execute / skip tasks by property in build.xml ?

    Hi,
    I want to create a build.xml to execute / skip tasks dynamically by property in build.xml.
    eg: I can define one property "needObfuscate" in either "true" or "false". I will contruct 2 tasks for obfuscate and non-obfuscate to fullfill the 2 cases. Only one of them WILL be executed depend on the flag "needObfuscate".
    ** I know Antenna's task "wtkpackage" has an arguement "obfuscate" to set. It's an example, what I want to know is how to execute / skip the tasks.
    Task "condition" is just used to set the property in runtime.
    <condition property="result" value="User choose 001.">
    <equals arg1="001" arg2="${select}"/>
    </condition>
    There is other tasks can fullfill what I expect ?
    Please guide me how to make it.
    Thanks.

    Hi,
    I've done one build.xml like below:
    <?xml version="1.0"?>
    <project name="PropertyPromptExample" default="main" basedir=".">
    <target name="windowsTask">
    <echo>windowsTask</echo>
    </target>
    <target name="linuxTask">
    <echo>linuxTask</echo>
    </target>
    <target name="main">
    <input message="Please enter platform(0 Windows, 1 Linux):" addproperty="select"/>
    <condition property="platform" value="windowsTask">
    <equals arg1="0" arg2="${select}"/>
    </condition>
    <condition property="platform" value="linuxTask">
    <equals arg1="1" arg2="${select}"/>
    </condition>
    <antcall target="${platform}"/>
    </target>
    </project>
    :)

  • Setting the Member & data build level dynamically

    Hello, I have got a situation where i need to set the Member & data build level dynamically based on the member. The option "Build Multidimensional down to here"(OLAPMetaoutline Menu)can be used,But when we use this option i could not perform my task as i need set the Build level dynamically based on the member level.I have to set the level dynamically for the following instance.Suppose My time dimension hierarchy is as follows: BY Year BY Quarter By Month If the year is say 1995,then quarter level & month level data is not required. If the year is say 1998,then quarter level & month level data is required. Could anyone provide a solution for dynamically setting the Member & data build level? Thanks,Sathyan

    Hi CTS,
    Thanks for ur repply,
    My source side i am having BANK_BRANCH_STATUS table has BRANCH_CODE and EOC_STATUS(possible values for this column is 'N','T','F','E' & 'B').
    The source table from which data has to tranform will be having BRANCH_CODE.
    i made odiwaitfordata as 1st step in package ,in this step the code looks like this
    OdiWaitForData "-CONTEXT=GLOBAL" "-GLOBAL_ROWCOUNT=1" "-LSCHEMA=ORACLE_FCSAILS" "-POLLINT=1000" "-RESUME_KEY_OPERATOR==" "-SQLFILTER=EOC_STATUS='E'" "-TIMEOUT=0" "-TIMEOUT_WITH_ROWS_OK=YES" "-UNIT_ROWCOUNT=>=1" "-INCREMENT_DETECTION=NO" "-TABLE_NAME=BANK_BRANCH_STATUS" "-OBJECT_TYPE=T"
    In the procedure,
    Source command-select branch_CODE from BANK_BRANCH_STATUS WHERE EOC_STATUS='E'
    Target command- Execute scenario for batch with branchid as a parameter... how to put up this in code form....could u suggest me?
    3) flag those which are executed so you don't wait for them again --how to put up this in code form....could u suggest me?
    Please sugest me,
    Thanks,
    MNK

  • Do we need to have build.xml for a project created in Eclipse WTP

    Hi^^,
    I had created a project in struts some time back. I remember that the classes wern't compiling until we added the build.xml to the project in the WEB-INF folder.
    Now I have cretaed a "dynamic web project" in eclipse WTP. When I right click on the project I get the option of build project. When I select the option the java classes do get compiled. My question is how does that happen without the build.xml being included in the project folder. There is a build folder but it only has the classes folder when we get the .class files after compiling.
    thanks and Regards,

    hi^^,
    I will rephrase the question. How does Eclipse build the project so that all the java files are converted to class files without using build.xml.
    ?????????

  • Exported build.xml doesn't build Service Control correctly

    We created a few components that build properly in Workshop...but not in the build.xml that Workshop generates. We are using Workshop 9.2.
    Here is what we did...
    1) Coded a Web Service that uses the ALDSP 3.0 dynamic mediator API (to access a data service)
    2) Generated a WSDL from that service
    3) Created a Service Control (that uses the WSDL from #2)
    When we do a build via Project -> Clean (with Build Automatically enabled), this gets built just fine.
    When we run the Ant task with the targets "clean, build", it fails when it tries to compile the SEI file (the file that gets generated for #3 above).
    During the build process (from the Workshop-exported build.xml file), the com.bea.control.servicecontrol.impl.ServiceControlAssembler appears to generate the MyServiceControlSEI.java file that does not compile.
    Although the compile error probably has to do with the naming conventions in our XML schema, we at least want to get the build.xml build process to act the same way as the regular Project -> Clean process (in which case our project builds just fine...even with our XML schema issues).
    My question is...does the Project -> Clean process use a different set of APTs or tasks to generate the SEI file than the build.xml process? If so, how can we configure the exported build.xml file to use the same tasks/tools as the Project -> Clean process?
    Thank you,
    Michael

    Hi Michael,
    Can you confirm if you are running the ant script from the command line and have run the setenv.cmd/sh script prior to running the ant tasks
    more info on executing ant script from the command line is available at
    [url http://e-docs.bea.com/wlw/docs102/guide/ideuserguide/build/conUseCustomAntBuild.html]http://e-docs.bea.com/wlw/docs102/guide/ideuserguide/build/conUseCustomAntBuild.html
    cheers
    Raj

  • Can ant call a target from my build.xml from another xml file?

    can ant have a target something like this:
    <target mytarget>
    <antcall file="C:\app\build2.xml" targetname="blah">
    </target>
    Is it possible to call a target in my build.xml that will then look in a file called build2.xml and call a target in that xml file?
    Thanks,
    Tad

    I looked at the manual and the site and couldn't find anything, you don't have to tell me the exact xml if
    it bugs you, all I want to know is if it is possible and if it is what task should I use, I will look up
    the attributes and how to do it.Now this really takes the biscuit.
    I gave you a very specific link to the document that tells you which task to use and which arguments to set. Did you check that link? If so, what else do you want? If not, why not?

  • Increase JVM memory size in build.xml?

    Hi,
    I want to know if it is possible to increase the JVM memory size in the "build.xml" file of my java fx project itself?If so,how to go about it?
    Thanks a lot.

    I think you can achieve that by specifying <fx:jvmarg>.
    For example:
    <fx:deploy width="${applet.width}"
                   height="${applet.height}"   
                   embedJNLP="true"
                   nativeBundles="all"
                      outdir="${dist.dir}" 
                   outfile="${application.title}"
                   verbose="true">
         <!--
         Increase JVM memory size.
         http://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference002.htm#CIAGFFIF
         -->
         <fx:platform javafx="2.2+" j2se="7.0">
              <fx:jvmarg value="-Xms64M"/>
              <fx:jvmarg value="-Xmx512M"/>
         </fx:platform>
    </fx:deploy>Hope that helps!
    Edited by: ytw on Nov 16, 2012 12:30 PM

Maybe you are looking for

  • Audigy 2 ZS platinum pro and msvcrt.

    scard: Audigy 2 ZS Platinum Pro OS: Windows XP SP3 msvcrt.dll: 7.0.2600.552 located only in windows\system32 and windows\ServicePackFiles\i386 I tried to update the driver. (Full uninstall of the previous one as per the FAQ plus some cleaning tools l

  • Mini-DV/DVD/Gigabytes

    Hello. I have a couple of questions I was hoping someone could answer. 1. How many gigabytes are necessary on my harddrive in order to import one hour of mini-DV tape? 2. Is there a best DVD format to use? 3. Do DVDs come in different capacities? 4.

  • I can't break a table row between pages (going nuts!)

    I'm setting a several page table (one of a few I need to set for a book) with long texts in many of the cells. I'm using CS3 InDesign on a new Mac. I've looked at similar threads (been struggling with this all day). The paragraph style and table styl

  • TS2570 After performing a "disk repair" a message in red indicates "Error: The underlying task reported failure on exit.

    Can someone help me with this issue. I can't install disk and restart my Mac it indicates verify permissions for Mac OSx install disc 1, the red error message states the underlying task reported failure on exit. I cannot start up my Mac and I am conc

  • Sharing Musics between two Local LAN's

    Ok, Here's the problem I'm having, I downloaded Itunes a couple days ago, and it works fine with no problems, I have my computer set up to share my music with the IP of.. 192.168.1.XXX. now, I have another LAN within my house that I use for work with