Which API can be used to write to an XML file(web.xml) programmatically

Hi,
I wish to write to the web.xml file programmatically.Could anyone point me to the
API that is to be used.
I am aware of the API to be used for extracting the node and the tag values - com.bea.p13n.xml.util.DomHelper
but this class has only getters and I wish to know which API should be used to set
the xml nodes.
It is important and am looking forward to pointers.
Thanks in advance!
Regards,
Shikha

S. Bajaj
org.w3c.dom Api
Deepak
shikha wrote:
Hi,
I wish to write to the web.xml file programmatically.Could anyone point me to the
API that is to be used.
I am aware of the API to be used for extracting the node and the tag values - com.bea.p13n.xml.util.DomHelper
but this class has only getters and I wish to know which API should be used to set
the xml nodes.
I am unable to find answer to this.
Looking forward to pointers and help.
Thanks in advance!
Regards,
Shikha

Similar Messages

  • Which API can use to save PDF document with Adobe Reader 9?

    Hello,
        which API can use to save PDF document with Adobe Reader 9? It is said that "CosDocSaveWithParams" can't be used.
    thanks!
    jimmy

    Unless the PDF file is "READER ENABLED for SAVE" (see the adobe product pages on LiveCycle Reader extensions server)
    You are not able to call a Save at all, if the document is reader enabled then you need to use the JavaScript call to save the document,
    As you appear to be wanting to do this in a plug-in you would need to call the script from a plug-in, this can be done using the AFExecuteThisScript () function call.
    Please note that this does will fail if the document is not reader enabled for save and you need to include the Forms HFT in your plug-in,
    This plug-in would also have to be approved by Adobe to be used with the reader and as you are implementing a function that is available in the full Acrobat product this may not be a straight forward approval.
    HTH
    Malky

  • In which trigger can i use go_item() in oracle forms 6i?

    Hi,
        I have a problem with go_item.
    I tried executing go_item() in triggers like key_next_item, pre_text_item, post_text_item & when_validate_item.
    But none of them seemed to be working.
    I searched for other possibilities in the site, where i found a solution of using trigger ' when_timer_expired ' with ' when_validate_item ' ,
    but when i tried to create trigger, i did not find that trigger (when_timer_expired)  in the list at all.
    I'm using oracle form builder 6i.
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production.
    A trigger with go_item() must be created when tab is pressed.
    In which trigger can i use go_item() ??
    Thank You.

    from help:
    Restricted Built-in Subprograms
    Restricted Built-ins affect navigation in your form, either external screen navigation, or internal navigation. You can call these Built-ins only from triggers while no internal navigation is occurring.
    Restricted Built-ins cannot be called from the Pre and Post triggers, which fire when Oracle Forms is navigating from object to another.
    Restricted Built-ins can be called from the When triggers that are specific to interface items, such as When-Button-Pressed or When-Checkbox-Changed. Restricted Built-ins can also be called from any of the When-New-"object"-Instance triggers and from key triggers.
    Unrestricted Built-ins do not affect logical or physical navigation and can be called from any trigger.
    The Built-in descriptions include a heading, Built-In Type, that indicates if the Built-in is restricted or unrestricted.

  • Which cable can I use to connect my ipad to my iphone

    Which cable can I use to connect my ipad to my iphone when I need to connect to the internet when not in a Wi-Fi hotspot.?

    Your question has already been asked and answered in your duplicate post.

  • I have a 3.06 Ghz Intel cor 2 duo 4GB 1067 Mhz DDR3. Which update can i use.

    I have a 3.06 Ghz Intel cor 2 duo 4GB 1067 Mhz DDR3. Which update can i use.

    Yosemite. Back up your data, check your applications for compatibility, and download it from the Mac App Store.
    If desired, you can instead buy a download code for Lion or Mountain Lion from the online Apple Store.
    (123967)

  • IMAC 2010 which HDD can I use to replace the malfunctioned Seagate Barracuda 7200.12 1TB?

    iMAC 2010 which HDD can I use to replace the malfunctioned Seagate Barracuda 7200.12 1TB?

    After doing a bit more research, the 2010 iMacs do appear to have a third cable connecting to the  hard drive, for the internal temp sensor.  This would appear to be the block of 8 pins that are on almost all drives, but they are normally intended for jumpers.  Unfortunately I was unable to find any documentation or specs that would indicate this pin block connects to the internal temp sensor on either standard (non-Apple) WD Black or Seagate 7200.12 drives.
    I did find some info that may be of some use:
    WD: Where to connect an external temperature sensor to a Serial ATA or EIDE hard drive.iFixit: Replace the hard drive, how do I connect the hard drive thermal sensor?
    Apple Technician Guide: iMac 2010 27" (mid-2010)
    Various discussion threads I found through google searching indicated some people succeeded with installing an external temp sensor on the body of the drive.
    Sorry I couldn't help more.

  • If I need to burn multiple audio CDs which software can I use?

    If I need to burn multiple audio CDs which software can I use?

    Personally I use the freeware SimplyBurns or Burn for all burning
    http://www.macupdate.com/find/mac/Burn

  • Which software can i use for recovery management that will allow me to use DVD's instead of Flashdsk

    which software can i use for recovery management that will allow me to use DVD's instead of Flashdisk? I find DVD's easier to use. i am using windows 10

    As the other posters wrote in order to take a movie file and turn it into a DVD that can be played in standard DVD players you need a DVD authoring application. That you need a separate program to create the DVD is standard procedure and has been that way since the beginning. All Apple produce that can produce video files require an external authoring program. iMovie, iPhoto and Final Cut all do this.
    One other thing I will comment on is your choice of output format. You will almost certainly be disappointed with the video quality of your finished DVD if you put a HD video on a SD DVD. Unless you plan to burn a bluray disk you will get a better quality video if you output as SD if you plan to burn to an SD disk.
    regards

  • Which iMovie can i use on a g5 dual processor

    which iMovie can i use on a g5 dual processor

    According to this: 
    http://www.macrumors.com/2013/10/22/some-users-with-older-copies-of-ilife-and-iw ork-having-difficulties-upgrading-to-new-versions/
    it is available from the App Store for $15.  It doesn't show when I launch AppStore but that may be because I already have later versions.  You will have to search for it on the web.   As part of iLife '09 its pretty old now but Ebay appears to have some copies available.
    Best of luck!
    Geoff.

  • AppleCare for Macbook - Which one can I use M8852LL   /A  or  /B ?

    AppleCare for Macbook -
    Which one can I use M8852LL /A or /B ?
    /A is older version /B newer version , I think both are good for Macbook, but can't get a definite answer from Apple. Anyone here know ?
    Macbook 1.83   Mac OS X (10.4.7)   Combo Drive, 2G, 120G HD

    more to say...
    Deciding factor should be price.I've found these folks have the best price on AppleCare.
    http://lacomputercompany.com
    Jim
    PowerBook G3 500 Mhz "Pismo"/ 2.0Ghz BlackBook 2GB OWC RAM   Mac OS X (10.4.7)  

  • Hello, is there a way that the Test Stand APIs can be used for ASP / Web?

    Hello,
    I do hope someone can be an idea.
    Is it possible that the TestStand API's can be used for ASP/Web?
    Currently, we are using Teststand running on exectuble application, but if the TestStand API's can be used on web (Just the operator interface), then it will be easier for engineers/operators to see the results locally and remotely by a web browser.
    Any ideas?
    Thanks for the help.
    Mhelinx

    Mhelinx,
    i don't think that the TestStand API can be used in ASP very nicely.
    TestStand is an ActiveX Server and it seems to be possible to use ActiveX in ASP, but i have read that doing will require reboots of the server from time to time (never done that myself, so relying on 3rd party information).
    But there is another, maybe better approach:
    Using LabVIEW as your user interface, you can use the Webserver capability of LabVIEW to include the functionality of your UI into your ASP webpages. You can create different "looks" for your application in the webpage while the LV UI stays always the same......
    I have never done this as well, and it might be a bit tricky to access data from the visible controls though.
    hope this helps,
    Norbert
    PS: If you are using C# for the UI, i think that this is possible as well....
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How can I use XStream to persist complicated Java Object  to XML & backward

    Dear Sir:
    I met a problem as demo in my code below when i use XTream to persist my Java Object;
    How can I use XStream to persist complicated Java Object to XML & backward??
    See
    [1] main code
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.ArrayList;
    import com.thoughtworks.xstream.XStream;
    import com.thoughtworks.xstream.io.xml.DomDriver;
    public class PhoneList {
         ArrayList<PhoneNumber> phones;
         ArrayList<Person> person;
         private PhoneList myphonelist ;
         private LocationTest location;
         private PhoneList(String name) {
         phones = new ArrayList<PhoneNumber>();
         person = new ArrayList<Person>();
         public ArrayList<PhoneNumber> getphones() {
              return phones;
         public ArrayList<Person> getperson() {
              return person;
         public void addPhoneNumber(PhoneNumber b1) {
              this.phones.add(b1);
         public void removePhoneNumber(PhoneNumber b1) {
              this.phones.remove(b1);
         public void addPerson(Person p1) {
              this.person.add(p1);
         public void removePerson(Person p1) {
              this.person.remove(p1);
         public void BuildList(){
              location = new LocationTest();
              XStream xstream = new XStream();
              myphonelist = new PhoneList("PhoneList");
              Person joe = new Person("Joe, Wallace");
              joe.setPhone(new PhoneNumber(123, "1234-456"));
              joe.setFax(new PhoneNumber(123, "9999-999"));
              Person geo= new Person("George Nixson");
              geo.setPhone(new PhoneNumber(925, "228-9999"));
              geo.getPhone().setLocationTest(location);          
              myphonelist.addPerson(joe);
              myphonelist.addPerson(geo);
         public PhoneList(){
              XStream xstream = new XStream();
              BuildList();
              saveStringToFile("C:\\temp\\test\\PhoneList.xml",convertToXML(myphonelist));
         public void saveStringToFile(String fileName, String saveString) {
              BufferedWriter bw = null;
              try {
                   bw = new BufferedWriter(
                             new FileWriter(fileName));
                   try {
                        bw.write(saveString);
                   finally {
                        bw.close();
              catch (IOException ex) {
                   ex.printStackTrace();
              //return saved;
         public String getStringFromFile(String fileName) {
              BufferedReader br = null;
              StringBuilder sb = new StringBuilder();
              try {
                   br = new BufferedReader(
                             new FileReader(fileName));
                   try {
                        String s;
                        while ((s = br.readLine()) != null) {
                             // add linefeed (\n) back since stripped by readline()
                             sb.append(s + "\n");
                   finally {
                        br.close();
              catch (Exception ex) {
                   ex.printStackTrace();
              return sb.toString();
         public  String convertToXML(PhoneList phonelist) {
              XStream xstream = new  XStream(new DomDriver());
              xstream.setMode(xstream.ID_REFERENCES) ;
              return xstream.toXML(phonelist);
         public static void main(String[] args) {
              new PhoneList();
    }[2].
    import java.io.Serializable;
    import javax.swing.JFrame;
    public class PhoneNumber implements Serializable{
           private      String      phone;
           private      String      fax;
           private      int      code;
           private      String      number;
           private      String      address;
           private      String      school;
           private      LocationTest      location;
           public PhoneNumber(int i, String str) {
                setCode(i);
                setNumber(str);
                address = "4256, Washington DC, USA";
                school = "Washington State University";
         public Object getPerson() {
              return null;
         public void setPhone(String phone) {
              this.phone = phone;
         public String getPhone() {
              return phone;
         public void setFax(String fax) {
              this.fax = fax;
         public String getFax() {
              return fax;
         public void setCode(int code) {
              this.code = code;
         public int getCode() {
              return code;
         public void setNumber(String number) {
              this.number = number;
         public String getNumber() {
              return number;
         public void setLocationTest(LocationTest bd) {
              this.location = bd;
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(location);
            f.getContentPane().add(location.getControls(), "Last");
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
         public LocationTest getLocationTest() {
              return location;
         }[3].
    package test.temp;
    import java.io.Serializable;
    public class Person implements Serializable{
         private String           fullname;
           @SuppressWarnings("unused")
         private PhoneNumber      phone;
           @SuppressWarnings("unused")
         private PhoneNumber      fax;
         public Person(){
         public Person(String fname){
                fullname=fname;           
         public void setPhone(PhoneNumber phoneNumber) {
              phone = phoneNumber;
         public void setFax(PhoneNumber phoneNumber) {
              fax = phoneNumber;
         public PhoneNumber getPhone() {
              return phone ;
         public PhoneNumber getFax() {
              return fax;
        public String getName() {
            return fullname ;
        public void setName(String name) {
            this.fullname      = name;
        public String toString() {
            return getName();
    }[4]. LocationTest.java
    package test.temp;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class LocationTest extends JPanel implements ChangeListener
        Ellipse2D.Double ball;
        Line2D.Double    line;
        JSlider          translate;
        double           lastTheta = 0;
        public void stateChanged(ChangeEvent e)
            JSlider slider = (JSlider)e.getSource();
            String name = slider.getName();
            int value = slider.getValue();
            if(name.equals("rotation"))
                tilt(Math.toRadians(value));
            else if(name.equals("translate"))
                moveBall(value);
            repaint();
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(ball == null)
                initGeom();
            g2.setPaint(Color.green.darker());
            g2.draw(line);
            g2.setPaint(Color.red);
            g2.fill(ball);
        private void initGeom()
            int w = getWidth();
            int h = getHeight();
            int DIA = 30;
            int padFromEnd = 5;
            line = new Line2D.Double(w/4, h*15/16, w*3/4, h*15/16);
            double x = line.x2 - padFromEnd - DIA;
            double y = line.y2 - DIA;
            ball = new Ellipse2D.Double(x, y, DIA, DIA);
            // update translate slider values
            int max = (int)line.getP1().distance(line.getP2());
            translate.setMaximum(max);
            translate.setValue(max-padFromEnd);
        private void tilt(double theta)
            // rotate line from left end
            Point2D pivot = line.getP1();
            double lineLength = pivot.distance(line.getP2());
            Point2D.Double p2 = new Point2D.Double();
            p2.x = pivot.getX() + lineLength*Math.cos(theta);
            p2.y = pivot.getY() + lineLength*Math.sin(theta);
            line.setLine(pivot, p2);
            // find angle from pivot to ball center relative to line
            // ie, ball center -> pivot -> line end
            double cx = ball.getCenterX();
            double cy = ball.getCenterY();
            double pivotToCenter = pivot.distance(cx, cy);
            // angle of ball to horizon
            double dy = cy - pivot.getY();
            double dx = cx - pivot.getX();
            // relative angle phi = ball_to_horizon - last line_to_horizon
            double phi = Math.atan2(dy, dx) - lastTheta;
            // rotate ball from pivot
            double x = pivot.getX() + pivotToCenter*Math.cos(theta+phi);
            double y = pivot.getY() + pivotToCenter*Math.sin(theta+phi);
            ball.setFrameFromCenter(x, y, x+ball.width/2, y+ball.height/2);
            lastTheta = theta;  // save theta for next time
        private void moveBall(int distance)
            Point2D pivot = line.getP1();
            // ball touches line at distance from pivot
            double contactX = pivot.getX() + distance*Math.cos(lastTheta);
            double contactY = pivot.getY() + distance*Math.sin(lastTheta);
            // find new center location of ball
            // angle lambda = lastTheta - 90 degrees (anti-clockwise)
            double lambda = lastTheta - Math.PI/2;
            double x = contactX + (ball.width/2)*Math.cos(lambda);
            double y = contactY + (ball.height/2)*Math.sin(lambda);
            ball.setFrameFromCenter(x, y, x+ball.width/2, y+ball.height/2);
        JPanel getControls()
            JSlider rotate = getSlider("rotation angle", "rotation", -90, 0, 0, 5, 15);
            translate = getSlider("distance from end",  "translate", 0, 100, 100,25, 50);
            JPanel panel = new JPanel(new GridLayout(0,1));
            panel.add(rotate);
            panel.add(translate);
            return panel;
        private JSlider getSlider(String title, String name, int min, int max,
                                  int value, int minorSpace, int majorSpace)
            JSlider slider = new JSlider(JSlider.HORIZONTAL, min, max, value);
            slider.setBorder(BorderFactory.createTitledBorder(title));
            slider.setName(name);
            slider.setPaintTicks(true);
            slider.setMinorTickSpacing(minorSpace);
            slider.setMajorTickSpacing(majorSpace);
            slider.setPaintLabels(true);
            slider.addChangeListener(this);
            return slider;
    }OK, My questions are:
    [1]. what I generated XML by XSTream is very complicated, especially for object LocationTest, Can we make it as simple as others such as Person object??
    [2]. after I run it, LocationTest will popup and a red ball in a panel will dsiplay, after I change red ball's position, I hope to persist it to xml, then when I read it back, I hope to get same picture, ie, red ball stiil in old position, How to do that??
    Thanks a lot!!

    Positive feedback? Then please take this in a positive way: if you want to work on persisting Java objects into XML, then GUI programming is irrelevant to that goal. The 1,000 lines of code you posted there appeared to me to have a whole lot of GUI code in it. You should produce a smaller (much smaller) example of what you want to do. Calling the working code from your GUI program should come later.

  • I am using MS Office 2010 and Windows XP Professional, can I use iCloud for backup of my files and documents?

    I am using MS Office 2010 and Windows XP Professional, can I use iCloud for backup of my files and documents? I am planning to transition to a Mac so using the iCloud seems to make the most sence.

    No, it is not a backup method at all.  If you delete a sync'd file on any device, you delete it permanently from iCloud.  That by its very essence is not a backup solution therefore.  A backup solution does not automatically and simultaneiously delete the file everywhere when it is deleted from the original source.
    iCloud is strictly a syncronization tool for using files on multiple internet connected devices.

  • How can i using datasource in toplink's map file

    In the TopLink map :
    <toplink:login xsi:type="toplink:database-login">
    <toplink:platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</toplink:platform-class>
    <toplink:user-name>test</toplink:user-name> <toplink:password>C23487CFA591952D44310804F3D591CB</toplink:password>
    <toplink:sequencing>
    <toplink:default-sequence xsi:type="toplink:native-sequence">
    <toplink:preallocation-size>1</toplink:preallocation-size>
    </toplink:default-sequence>
    </toplink:sequencing>
    <toplink:driver-class>oracle.jdbc.driver.OracleDriver</toplink:driver-class>
    <toplink:connection-url>jdbc:oracle:thin:@192.168.0.1:1521:testdb</toplink:connection-url>
    <toplink:bind-all-parameters>true</toplink:bind-all-parameters>
    </toplink:login>
    How can i modify it using datasource?

    The login information stored in the map file is good for direct connection and design time login information.
    For your runtime login information I would use the sessions configuration (sessions.xml). It provides complete deployment configuration:
       <session>
          <name>my-session</name>
          <!-- This references the ORM map XML file -->
          <project-xml>META-INF/employee-basic.xml</project-xml>
          <session-type>
             <server-session/>
          </session-type>
          <login>
             <datasource>jdbc/TopLinkDS</datasource>
             <uses-external-connection-pool>true</uses-external-connection-pool>
             <uses-external-transaction-controller>true</uses-external-transaction-controller>
          </login>
          <external-transaction-controller-class>oracle.toplink.essentials.transaction.oc4j.Oc4jTransactionController</external-transaction-controller-class>
          <enable-logging>true</enable-logging>
          <logging-options>
             <log-exceptions>true</log-exceptions>
             <print-thread>false</print-thread>
             <print-date>false</print-date>
          </logging-options>
       </session>Doug

  • Can I use Photoshops example images on my companies web site?

    On the Photoshops CD, there is a lot of example images, Can I use these example images on my companies web site?

    Here's the process to roll back:
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, download and save Firefox 3.6 to your desktop for future installation. http://www.mozilla.com/firefox/all-older
    Close Firefox 4.
    You could install Firefox 3.6 over it (many have reported success) or you could uninstall Firefox first. If you uninstall, do not remove your personal data and settings, just the program.
    Unless you have installed an incompatible add-on, Firefox 3.6 should pick up where you left off. If there are serious issues, please post back with details.
    Note: I haven't actually tried this myself!
    Does that resolve the NASA issues?

Maybe you are looking for

  • Writeback error in OBIEE 11g

    I am using the writeback template below. It works fine if my browser is set to English language. *<?xml version="1.0" encoding="utf-8" ?>* *<WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">* *<WebMessageTable lang="en-us" system="Wr

  • How to change the plant manually in the order

    Hi All,        I have created a debit memo for two items in va01 with ref to the service order,for 1 item wrong plant has been triggered.We have created the billing document for two different item,now i have to change the plant of 1 item,so i have de

  • ITunes 8.0.2 has eaten all of my purchased music.

    I saw a similar problem through google search for some iTunes 7 users, but so far not on iTunes 8. I have not de-authorized the computer. Ever. I did not choose to delete anything. Yet, NONE of my purchases can be found on the hard drive anymore. The

  • DataServices SQLDriverConnect Error [Source (ERP) → Query → Target (HANA) ]

    When the job is executed, including the following data flow, error occurs in SQLDriverConnect. Please tell us why. Source (ERP) u2192 Query u2192 Target (HANA) Error: ODBC call <SQLDriverConnect> for data source <data source name> failed: <[Microsoft

  • Synchronization issues -Help

    Hi, I have 20 tables in universe, there are some isolated tables, Now I created  4 alias tables of table X (existing one)(new alias tables are A,B,C,D) then  joined new table E and Joined Many to One to (E-A,E-B,E-C and E-D).Now If I drag One Objects