How to create and modify an XML file from an Oracle Form

I would like to build an Oracle Form to maintain a small XML file in the file system (i.e. Not in Oracle database but in the operating system).
I would like the Form to display existing values from the XML file and the user can update and save content back to the XML file.
Can any one tell me how this can be done? Thanks.

Does Forms 9i provide any XML Parser Functions?
Can I insert the XML file into a table column by inserting XML using the XSU Front End rather than using TEXT_IO to maintain the XML file directly?
Can I use XSU PL/SQL API in Forms to retrieve and modify XML values?
Any help is appreciated.

Similar Messages

  • How to create and manage the log file

    Hi,
    I want to trace and debug the program process.
    I write the code for creating log file and debugging the process.
    But i am not able get the result.
    please help me how to create and manage the log file.
    Here i post sample program
    package Src;
    import java.io.*;
    import org.apache.log4j.*;
    import java.util.logging.FileHandler;
    public class Mylog
         private static final Logger log = Logger.getLogger("Mylog.class");
         public static void main(String[] args) throws Exception {
         try {
           // Create an appending file handler
            boolean append = true;
            FileHandler handler = new FileHandler("debug.log", append);
            // Add to the desired logger
            Logger logger = Logger.getLogger("com.mycompany");
            System.out.println("after creating log file");     
              catch (IOException e)
                   System.out.println("Sys Err");
            }Please give the your valuable suggesstion... !
    Thanks
    MerlinRoshina

    Just i need to write a single line in log file.

  • How to compile and run a .java file from another java program

    hello,
    can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?

    Well a smarter way of implementing this is by using a solution provided by Java Itself.
    If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
    http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
    How do i do that ??
    Check out the below articles which would help you of how to do that
    http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
    http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
    http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
    Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
    Hope that might help :)
    REGARDS,
    RaHuL

  • Generate XML file from an Oracle Database Table

    Hello All,
    I want to generate a xml file from an Oracle Database table which contains a blob column.
    Can somebody give pointers on this please.
    Thanks in advance
    Sulakshana

    Use the DBMS_XMLGEN package.

  • How to create and edit a .ini file using java

    Hi All...
    Pls help me in creating and editing an .ini file using java...
    thanks in advance
    Regards,
    sathya

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • Trying to create a XML file from an ASP Form

    I have an ASP form on my website that generates a XML data
    file, but there are a few problems with it. First, when I generate
    the file, it creates a new file every time a user clicks on
    "Submit" and I would like the data to just be appended to a
    particular, existing XML file...how can I append the data to the
    XML file? The code I am currently using is shown below.
    Secondly, I need to nest/repeat certain fields within the XML
    file. Basically, I want the XML file to look like this (I
    simplified the code for ease of writing, so don't bother with the
    syntax):
    <Recipe>
    <RecipeName>
    <SubmittedBy>
    <Ingredients>
    <Amount>
    <Unit>
    <Ingredient>
    <Description>
    <Directions>
    <Recipe>
    <RecipeName>
    etc...
    How would I create a form that would create that type of XML
    file? Think of a MS Access form with linked subforms, but I don't
    want to repeat more data than I have to.
    Any advice or help would be very appreciated!!! Also, if you
    know of a 3-party product that might solve this for me, I am open
    to that also!
    Thanks!!!
    ASP Page Code:

    You may find this article useful
    http://xmlfiles.com/articles/michael/appendxml/default.asp
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "kbeveridge6778" <[email protected]> wrote
    in message
    news:[email protected]...
    >I have an ASP form on my website that generates a XML
    data file, but there
    >are
    > a few problems with it. First, when I generate the file,
    it creates a new
    > file
    > every time a user clicks on "Submit" and I would like
    the data to just be
    > appended to a particular, existing XML file...how can I
    append the data to
    > the
    > XML file? The code I am currently using is shown below.
    >
    > Secondly, I need to nest/repeat certain fields within
    the XML file.
    > Basically, I want the XML file to look like this (I
    simplified the code
    > for
    > ease of writing, so don't bother with the syntax):
    > <Recipe>
    > <RecipeName>
    > <SubmittedBy>
    > <Ingredients>
    > <Amount>
    > <Unit>
    > <Ingredient>
    > <Description>
    > <Directions>
    > <Recipe>
    > <RecipeName>
    > etc...
    > How would I create a form that would create that type of
    XML file? Think
    > of a
    > MS Access form with linked subforms, but I don't want to
    repeat more data
    > than
    > I have to.
    >
    > Any advice or help would be very appreciated!!! Also, if
    you know of a
    > 3-party product that might solve this for me, I am open
    to that also!
    >
    > Thanks!!!
    >
    > ASP Page Code:
    >
    > Function saveXMLData(strPath, strFileName)
    >
    > 'Declare local variables.
    > Dim aXMLDoca
    > Dim aRootNode
    > Dim aFormVar
    > Dim aPI
    > Dim Item
    >
    > 'Create an XMLDOM Object
    > Set aXMLDoca = server.CreateObject("Microsoft.XMLDOM")
    > aXMLDoca.preserveWhiteSpace = True
    >
    >
    > 'Create the root node for the document
    > Set aRootNode = aXMLDoca.createElement("function")
    > aXMLDoca.appendChild aRootNode
    >
    >
    > 'Iterate the Request Object for all form data
    > For Each item in Request.Form
    >
    > 'Do not include the variable if it contains btn
    > If instr(1,item,"btn") = 0 Then
    > Set aFormVar =aXMLDoca.createElement(item)
    > aFormVar.Text = Request.Form(item)
    > aRootNode.appendChild aFormVar
    > End If
    >
    > Next
    >
    >
    > 'Append the processing instruction
    >
    > Set aPI =
    aXMLDoca.createProcessingInstruction("xml","version='1.0'")
    > aXMLDoca.insertBefore aPI, aXMLDoca.childNodes(0)
    >
    >
    > 'Save the XML document.
    > aXMLDoca.save strPath & "\" & strFileName
    >
    >
    > 'Release all references.
    > Set aXMLDoca = Nothing
    > Set aRootNode = Nothing
    > Set aFormVar= Nothing
    > Set item = Nothing
    > Set aPI = Nothing
    > End Function
    >
    > dim strFullFile
    >
    > Function DoesFileExist(ByVal strFullFile)
    > Dim objFSO
    >
    > 'If InStr(strFullFile, ":") = 0 Then
    > 'strFileNam = Server.MapPath(strFullFile)
    > 'End If
    >
    > Set objFSO =
    Server.CreateObject("Scripting.FileSystemObject")
    > DoesFileExist = objFSO.FileExists(strFullFile)
    > Set objFSO = Nothing
    > End Function
    >
    >
    > Const cont_Num=10000
    > Randomize
    > Dim intNumber
    > dim strFile
    > Dim blnYes
    >
    > blnYes=False
    >
    > Do Until blnYes=True
    >
    > intNumber=Int((Cont_Num * Rnd)+1)
    >
    > 'Create a random file name so you don't write over the
    same file
    > strFile="Recipe"& intNumber &".xml"
    >
    > strFullFile="c:\inetpub\wwwroot\xmltest\" & strFile
    >
    > if DoesFileExist(strFullFile)=False then
    > blnYes=True
    > End If
    > Loop
    >
    > ' The page starts here
    > On Error Resume Next
    >
    > ' Save the XML Data
    > SaveXMLData "c:\inetpub\wwwroot\xmltest",strFile
    >

  • How to create and modify multiple responsibilities thru backend

    Hi,
    I have to create multiple responsibilities.
    Also I have to rename the current responsibilities.
    How can I do this using sql scripts.
    At metalink I found that you can use FND_FUNCTION_SECURITY package to do this.
    But I dont have the details how to use this package.
    Thanks,
    Dnyanesh

    Does Forms 9i provide any XML Parser Functions?
    Can I insert the XML file into a table column by inserting XML using the XSU Front End rather than using TEXT_IO to maintain the XML file directly?
    Can I use XSU PL/SQL API in Forms to retrieve and modify XML values?
    Any help is appreciated.

  • How to find and modify underlying XML Template for a OA Framework page

    Env: R12
    There is a standard OA Framework page in Purchasing that can be reached by
    Purchasing Manager > Buyer Work Center > Orders > Search for a specific PO > Open the PO Page
    Then Open the PO Details page for what you searched
    Now in the PO Details Page, On the right hand top corner is a drop down list for Actions > View PDF
    This generates a PDF output of the PO, PO Details and the terms and conditions.
    I want to modify this pdf. ( Change the template and add/remove a few columns)
    I believe that this is an XML Pub report running in the background but how to find out what report is running and how to modify its template ??
    Thanks
    Gabbar

    Hi Gabbar,
    Click on 'About this Page' and figure out the page, controller, AM and VOs. You can download these xml and class files from JAVA_TOP. Page can be downloaded from mds directory under PRODUCT_TOP.
    Regards

  • How to create and instance of Java Object from an XML Document.

    Hi,
    How can we use a XML Document to create an instance of Java Object and do vice versa ie from the Java Object creating the XML Document.
    XML Document is available in the form of a String Object.
    Are there helper class available to achieve this.
    I need to do this in a Servlet.
    Regards
    Pramod.

    JAXB is part of JavaSE while Xmlbeans claims full schema support and full infoset fidelity.
    If the standard APIs do all that you need well then use them.

  • How to create and write in a file

    Hello Gurus,
    I am creating a file based on the date and time and writing into that. But, I am still getting exception error and all. Kindly, please let me know.
    thanks for all the help...j
    Error:-
    C:\Usage\JavaFiles>java filename "abc"
    Exception in thread "main" java.io.FileNotFoundException:Detail09-2003-
    03:28:04.doc (The system cannot find the file specified)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:176)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at TowerDetail.main(TowerDetail.java:30)
    Code sample:-
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.sql.*;
    import java.text.*;
    public class TowerDetail{
    public static void main (String[] args) throws IOException{
    String userName = "user";
    String passwd = "pwd";
    String con_db = "jdbc:odbc:datasource";
    String ssn = args[0];
    Vector results = new Vector();
    Connection con = null;
    CallableStatement cstmt = null;
    java.util.TimeZone tz = java.util.TimeZone.getTimeZone("EST");
    java.util.Date now = new java.util.Date();
    DateFormat df = new SimpleDateFormat("MM-dd-yyyy-hh:mm:ss");
    df.setTimeZone(tz);
    String result = df.format(now);
    String fileName = "Detail"+result+".doc";
    File inputFile = new File(fileName);
    FileOutputStream fos = new FileOutputStream(inputFile);
    PrintWriter pw = new PrintWriter(fos);
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    }catch (Exception e) {
    System.out.println("JDBC Error: "+e.getMessage());
    return;
    try{
    con = DriverManager.getConnection(con_db, userName, passwd);
    cstmt = con.prepareCall("{call dbo.sp_usage_detail(?)}");
    cstmt.setString(1, ssn.trim());
    ResultSet rs = cstmt.executeQuery();
    pw.println("Report "+result);
    pw.println("------------------------------------------------------------------------------------
    while(rs.next()){
    .... write in the file...
    pw.println("------------------------------------------------------------------------------------
    pw.close();
    System.out.println("Your file Detail"+result+".doc is ready!!!");
    cstmt.close();
    con.close();
    }catch(SQLException ex){
    System.out.println("SQLException: ");
    System.out.println(ex.getMessage());
    }catch(NullPointerException e){
    System.out.println("Null Pointer Exception: ");
    System.out.println(e.getMessage());

    Now, I got out of the command prompt and reentered. I didn't set any classpath or anything. I have created a subdir \archive in the C:\ and writing an output file [DetailTower.....doc")into that.
    The DetailTower.class is in C:\Detail\ProjectClass dirctory.
    Now at,
    C:\Detail\ProjectClass\java -classpath . DetailTower "abc"
    I am getting this error:-
    C:\Detail\ProjectClass>java -classpath . DetailTower "999999"
    Exception in thread "main" java.io.FileNotFoundException: c:\archive\DetailTower09-10-2003-06:23:40.doc (The system cannot find the file specified)at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(FileOutputStream.java:176)
            at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
            at Detail.main(DetailTower.java:32)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to create and handle a text file in CVI

    Is there any way to create and handle (like...open,write,read,truncate,close)  the .txt file in CVI?

    Sure. CVI is a regular C compiler and hence you can use all ANSI C functions. In addition you can use the File I/O functions from the utility library.

  • How to create and use library JAR files with command-line tools?

    Development Tools -> General Questions:
    I am trying to figure out how to put utility classes into JAR files and then compile and run applications against those JAR files using the command-line javac, jar, and java tools. I am using jdk1.7.0_17 on Debian GNU/Linux 6.0.7.
    I have posted a simple example with one utility class, one console application class, and a Makefile:
    http://holgerdanske.com/users/dpchrist/java/examples/jar-20130520-2134.tar.gz
    Here is a console session:
    2013-05-20 21:39:01 dpchrist@desktop ~/sandbox/java/jar
    $ cat src/com/example/util/Hello.java
    package com.example.util;
    public class Hello {
        public static void hello(String arg) {
         System.out.println("hello, " + arg);
    2013-05-20 21:39:12 dpchrist@desktop ~/sandbox/java/jar
    $ cat src/com/example/hello/HelloConsole.java
    package com.example.hello;
    import static com.example.util.Hello.hello;
    public class HelloConsole {
        public static void main(String [] args) {
         hello("world!");
    2013-05-20 21:39:21 dpchrist@desktop ~/sandbox/java/jar
    $ make
    rm -f hello
    find . -name '*.class' -delete
    javac src/com/example/util/Hello.java
    javac -cp src src/com/example/hello/HelloConsole.java
    echo "java -cp src com.example.hello.HelloConsole" > hello
    chmod +x hello
    2013-05-20 21:39:28 dpchrist@desktop ~/sandbox/java/jar
    $ ./hello
    hello, world!I believe I am looking for:
    1. Command-line invocation of "jar" to put the utility class bytecode file (Hello.class) into a JAR?
    2. Command-line invocation of "javac" to compile the application (HelloConsole.java) against the JAR file?
    3. Command-line invocation of "java" to run the application (HelloConsole.class) against the JAR file?
    I already know how t compile the utility class file.
    Any suggestions?
    TIA,
    David

    I finally figured it out:
    1. All name spaces must match -- identifiers, packages, file system, JAR contents, etc..
    2. Tools must be invoked from specific working directories with specific option arguments, all according to the project name space.
    My key discovery was that if the code says
    import com.example.util.Hello;then the JAR must contain
    com/example/util/Hello.classand I must invoke the compiler and interpreter with an -classpath argument that is the full path to the JAR file
    -classpath ext/com/example/util.jarThe code is here:
    http://holgerdanske.com/users/dpchrist/java/examples/jar-20130525-1301.tar.gz
    Here is a console session that demonstrates building and running the code two ways:
    1. Compiling the utility class into bytecode, compiling the application class against the utility bytecode, and running the application bytecode against the utility bytecode.
    2. Putting the (previously compiled) utility bytecode into a JAR and running the application bytecode against the JAR. (Note that recompiling the application against the JAR was unnecessary.)
    (If you don't know Make, understand that the working directory is reset to the initial working directory prior to each and every command issued by Make):
    2013-05-25 14:02:47 dpchrist@desktop ~/sandbox/java/jar
    $ cat apps/com/example/hello/Console.java
    package com.example.hello;
    import com.example.util.Hello;
    public class Console {
        public static void main(String [] args) {
         Hello.hello("world!");
    2013-05-25 14:02:55 dpchrist@desktop ~/sandbox/java/jar
    $ cat libs/com/example/util/Hello.java
    package com.example.util;
    public class Hello {
        public static void hello(String arg) {
         System.out.println("hello, " + arg);
    2013-05-25 14:03:03 dpchrist@desktop ~/sandbox/java/jar
    $ make
    rm -rf bin ext obj
    mkdir obj
    cd libs; javac -d ../obj com/example/util/Hello.java
    mkdir bin
    cd apps; javac -d ../bin -cp ../obj com/example/hello/Console.java
    cd bin; java -cp .:../obj com.example.hello.Console
    hello, world!
    mkdir -p ext/com/example
    cd obj; jar cvf ../ext/com/example/util.jar com/example/util/Hello.class
    added manifest
    adding: com/example/util/Hello.class(in = 566) (out= 357)(deflated 36%)
    cd bin; java -cp .:../ext/com/example/util.jar com.example.hello.Console
    hello, world!
    2013-05-25 14:03:11 dpchrist@desktop ~/sandbox/java/jar
    $ tree -I CVS .
    |-- Makefile
    |-- apps
    |   `-- com
    |       `-- example
    |           `-- hello
    |               `-- Console.java
    |-- bin
    |   `-- com
    |       `-- example
    |           `-- hello
    |               `-- Console.class
    |-- ext
    |   `-- com
    |       `-- example
    |           `-- util.jar
    |-- libs
    |   `-- com
    |       `-- example
    |           `-- util
    |               `-- Hello.java
    `-- obj
        `-- com
            `-- example
                `-- util
                    `-- Hello.class
    19 directories, 6 filesHTH,
    David

  • Crate XML file and send that XML file from R3 to SIBEL

    Hi Friends,
              Is SAP provided any idoc type and Message type for Goods Receipt (MIGO)??
    My requirement is to create XML file having 4 fields from MIGO then that XML file to be display in SIBEL system. Can anybody help me how can I do this.

    Hi Mohanty,
    hope it can help you.
    http://www.sapfans.com/sapfans/forum/intface/messages/4062.html
    Try cl_xml_document class, and also look at cl_ixml class factory.
    Regards,
    David

  • How to read the contents of XML file from my java code

    All,
    I created an rtf report for one of my EBS reports. Now I want to email this report to several people. Using Tim's blog I implemented the email part. I am sending emails to myself based on the USERID logic.
    However I want to email to different people other then me. My email addresses are in the XML file.
    From the java program which sends the email, how can I read the fields from XML file. If any one has done this, Please point me to the right examples.
    Please let me know if there are any exmaples/BLOG's which explain how to do this(basically read the contents of XML file in the Java program).
    Thank You,
    Padma

    Ike,
    Do you have a sample. I am searched so much in this forum for samples. I looked on SAX Parser. I did not find any samples.
    Please help me.
    Thank you for your posting.
    Padma.

  • Finding and retrieving an XML file from an application and an applet

    I have a problem.
    I have data stored in an XML file. I want to be able to call that file and store it into a document object from an application standing alone on a computer as weel as from an applet that would be running over the web.
    I don't know how to do this.
    When I use a relative path name for the application it attaches the path of the folder that contains java.exe. I could do something with the class path but this wouldn't help the end user of the application on a different computer. For similar reasons I don't want to hard code because I don't know where the final applet will be stored.
    I have a table that holds, sorts and filters the data so I want the table to collect the data, I don't want to dictate the path from the applet or the application, I want a method that is consistant with both scenarios.
    Can anyone offer some advice?

    I've just finished trying it out, here is what I did:
    String xmlDocName="filename.xml";
    java.net.URL fileURL=this.getClass().getResource(xmlDocName);
    private final String fileName = fileURL.toString().substring(6);
    The substring removes the "file:/" from the URL.
    This works fine in the IDE, I have even stored the xml file in a lower folder e.g. package_folder/xml_folder/filename.xml and replaced the xmlDocName with "xml_folder/filename.xml" and it worked fine.
    I haven't tried it in an applet because I'm running IE and as you are well aware there are problems with swing and IE applets. But you answer deserves the Duke Dollars, thank you very much.

Maybe you are looking for