Newbie - How to create XML based on given schema

Hello,
We have a requirement to create an XML message from our system (Oracle 9iR2 with Oracle Apps 11.5.10). The XML is generated from a query in our HR tables, and must be in a specific format (schema and example XML has been provided to us).
Newbie question is this: What is the best way to create this XML message (dynamic data coming from a SQL select) while ensuring that it matches the given schema? Most of our developers are strong PL/SQL with limited Java experience.
Thanks,
-- John

I've updated the FAQ with an answer and example for this question...
Please see the following thread
How to create XML from relational tables based on an XML Schema ?

Similar Messages

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • How to create Formula based value field in COPA

    Hi,
    I want to know how to create formula based  value field in COPA
    My Requirement is i want to collect some value in formula based value field and want to use in copa allocation cycle as a tracing
    factor.
    anybody give some light on the same topic or requirement ?
    Thanks
    Nilesh R

    The key figure you are creating in KE2K is not a value field, i.e. you can't post to it and you can't use it in a report. It is a caluculated value that can be used only in assessment and top-down-distribution.
    In Ke2K, enter a name for your key figure, then click on the the white sheet button to create it. Now the formular area is open for input. Input your formular (e.g. VV001 + VV002 - VV003 .... where VVXXX are the technical names of value fields).
    Now click the "check formuar"-button. Then save.
    Before you can use the key figure in assessment, execute TC KEUG.
    Now the key figure is available as any value field in the tracing factor selection of your assessment cycle.
    I hope this made it clearer.
    Regards
    Nikolas

  • How to create Profile Based Rule in Endeca Studio Developer

    Hi,
    Can anybody tell me how to create Profile based rule in the Endeca Studio Developer. and how to fecth the data in the JSP. what are the parameter required to pass in the ENEQuery
    Thanks
    Shailesh

    I use visual studio 2012.
    I dont see rule set editor which can help me create busineesss rule.
    Where can I find it?
    Hi Rajesh,
    If you want to learn more information about RuleSet Editor in .net framework 4.5, check out https://msdn.microsoft.com/en-us/library/ee960221(v=vs.110).aspx
    for more information. 
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create HeatMap based on Country Credit Rating?

    How to create Heatmap based on Country Credit Rating i....
    Credit Ratings are AAA, -AAA, +AA, AA, -AA, +A, A, -A, +BBB, BBB, -BBB, +BB....... From Green To Red
    Country    Credit Rating
    Angola
    BB-
    Botswana
    A-
    Burkina Faso
    B
    Ethiopia
    B-
    Ghana
    B
    Morocco
    BBB-
    Nigeria
    BB-
    Sierra Leone
    B-
    South Africa
    BBB
    Tanzania
    B
    Zambia
    B+
    Australia
    AAA
    India
    BBB-
    Indonesia
    BB+
    Pakistan
    B
    Philippines
    BBB
    Thailand
    BBB+
    Uzbekistan
    BBB
    Turkey
    BB+
    Chile
    AA-

    Thanks Jim for the solution.
    Also, this article should be helpful for you:
    Create a Heat Map Using Excel’s Conditional Formatting -
    http://peltiertech.com/heat-map-excel-conditional-formatting/
    (Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee
    the accuracy of this information.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Hi Ethan, If you trying to get points i understand but please do assume that googling is done first.
    If you want to get help from others, you should first be polite to those who are trying to help you, rather than "i already new the option of converting to numbers" or "If you trying to get points i understand but please do assume
    that googling is done first.".
    You didn't make it clear in your initial post that what you already tried, or which articles you already reviewed, how should us people know this?
    I'm sorry but here all is asked politely and please, politely do not  change the subject.

  • HOW TO CREATE PROMPT BASED ON ANOTHER PROMPT IN OBIEE

    HOW TO CREATE PROMPT BASED ON ANOTHER PROMPT IN OBIEE.
    Requiremenst is as follows.
    Year ,Qtr columns in first prompt.Based on selection on these prompts second prompt should display corresponding prompts
    Second prompt will have Month ,Week and Day columns.Second prompt should be hidden and based on first prompt selection second prompt should display with constraint based on first prompt.
    Any help would be highly appriciated!!!

    hi,
    Using Guided navigation it is possible,
    Please refer the below links.
    http://gerardnico.com/wiki/dat/obiee/dashboard_prompt_1_eq_0
    http://businessdecisionsystems.com/blog/?p=448
    Hope this help's
    Thanks,
    Satya

  • How to create ajax based tabs ..??

    Hi all,
    How to create Ajax based Tabs (or Tab like) in a JSF page..?
    Any clues..?
    Thanks and regards,
    Jijo

    You need to write your own jsf component for this.

  • How to validate xml file with XSD schema ??  in JDK1.4.2

    How to validate xml file with XSD schema ?? in JDK1.4.2
    i dont want to use new Xerec Jar ...
    Suggest option ...

    Please do not double-post. http://forum.java.sun.com/thread.jspa?threadID=5134447&tstart=0
    Then use Stax (Woodstock) or Saxon.
    - Saish

  • How to create xml nodes based on a value

    Dear friends,
    I've a question about graphical mapping in SAP PI...
    How can I create XML nodes on the target side based on a value in a XML field on the source side.
    For example:
    This XML field on the source:
    <NO_OF_LINES>4</NO_OF_LINES>
    Must result on 4 Lines on the Target:
    <LINE></LINES>
    <LINE></LINES>
    <LINE></LINES>
    <LINE></LINES>
    So it's actually the opposite of the Count function...
    I appreciate your help,
    Thank you in Advance,
    Kind regards,
    John

    Hi ,
    Try this
    NO_OF_LINES---> count---> UDF---> LINE
    example :
    UDF Code :
    for (int i=0;i<var1[0];i++)
    result.addValue("");

  • How to Create XML file with SAX parser instead of DOM parser

    HI ALL,
    I am in need of creating an XML file by SAX parser ONLY. As far as my knowledge goes, we can use DOM for such purpose(by using createElement, creatAttribute ...). Can anyone tell me, is there any way to create an XML file using SAX Parser only. I mean, I just want to know whether SAX provides any sort of api for Creatign an element, attribute etc. I know that SAX is for event based parsing. But my requirement is to create an XML file from using only SAX parser.
    Any help would be appreciated
    Thanx in advance
    Kaushik

    Hi,
    You must write a XMLWriter class yourself, and that Class extends DefaultHandle ....., the overwrite the startElement(url, localName, qName, attributeList), startDocument(), endElement().....and so on.
    in startElement write your own logic about how to create a new element and how to create a Attribute list
    in startDocument write your own logic about how to build a document and encodeType, dtd....
    By using:
    XMLWriter out = new XMLWriter()
    out.startDocument();
    Attribute attr1 = new Atribute();
    attr1.add("name", "value");
    out.startElement("","","Element1", attr1);
    Attribute attr2 = new Atribute();
    attr2.add("name", "value");
    out.startElement("","","Element2", attr2);
    out.endElement("","","Element2");
    out.endElement("","","Element1");
    out.endDocument();

  • How to create XML from multiple rows in a table?

    Hi All,
    I have a table where it has multiple rows as below which I need to send as a XML.. can any one let me know how to create?
    Table:
    PRDID,NAME,DESCRIPTION,SUPPLIER,PRICE
    2012,AAA,ADESC,SUPPLIER1,1.8
    2012,AAA,ADESC,SUPPLIER2,2.5
    XML should be :
    <ROOT>
    <PRDID>2012</PRDID>
    <NAME>AAA</NAME>
    <DESCRIPTION>ADESC</DESCRIPTION>
    <PRICE>
    <REGION>SUPPLIER1</REGION>
    <PRICE>1.8</PRICE>
    <REGION>SUPPLIER2</REGION>
    <PRICE>2.5</PRICE>
    </PRICE>
    </ROOT>
    Thanks
    Rajeev

    Hi
    This white paper shows how to do it - http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/101c974c-11f9-2b10-4da5-cd350b7eeda0
    Michael

  • How to create event based process chains

    Hi All,
    I would like to know about event based process chains. In connection to this, could you please answer the following queries,
    1. How to create events
    2. How to link created event to the process chain in the same BI or BW system and as well as from  
        externel BI system.
    3. How link one process chain with other process chain (i.e, After completion of one process chain, it
        should trigger other dependent process chain)
    Thanks and Regards,
    Kotesh.

    1). Doubt regarding first question.
    For example, i would like to create time based event (it should be trigger daily at specified time),
    where we have to maintain scheduling options while creating event.
    When i checked SM62 there i found only two options a). Event name and b). Description.
    Could please send any doucument link if you have.
    Ans : You can use function modules like "BP_EVENT_RAISE" in a program and schedule the program to trigger.
    2). For externel BIW system also same procedure we need to follow or any difference.
    Ans : Externally you need to trigger the same event.
    3). i found dependent process chain also had scheduling options as direct scheduling insted of start using meta chain or API. As you said dependent process chain should be mata chain. it seems dependent process chain may be Meta chain or Direct scheduilg.
    Ans : Its your choice how you want to schedule it.You can either make that dependent chain a metachain or schedule it separately.
    I found at the end of first process chain they kept one process like Raise event and second process chain connected with the help of raise event process event name. If you have any idea about this process could explain a bit more.
    Ans : May be they are raising the event in the main chain and triggering the dependent chain using this event.
    But Metachain is preferred for such thing.Though it does similar thing.
    Hope this helps.

  • How to create xml file from relational tables in 10gR2

    Hi,
    I am very new to XML and was wondering how to create an XML file from querying relational tables. Some child tables may contain multiple rows that need to be returned in certain instances. Other queries will just be single or multiple rows from one or more tables. I would like to use the latest feathers in 10gR2. Thanks for any help you can provide.
    Thanks,
    Lee

    Here is the first row of data created from our person table - it used the column names as the tag names:
    <?xml version="1.0"?>
    <ROWSET>
         <ROW>
              <MP_ID_SEQ>289</MP_ID_SEQ>
              <MP_NAME>LOBERG,JUDITH LEE</MP_NAME>
              <MP_SEX>F</MP_SEX>
              <MP_RACE>I</MP_RACE>
              <MP_DOB>19500709</MP_DOB>
              <MP_HT>504</MP_HT>
              <MP_WT>170</MP_WT>
              <MP_EYE_CLR>BLU</MP_EYE_CLR>
              <MP_HAIR_CLR>BRO</MP_HAIR_CLR>
              <MP_SKN>RUD</MP_SKN>
              <MP_SMT>POCKMARKS</MP_SMT>
              <MP_SOC>517607968</MP_SOC>
              <MP_OLN>517607968</MP_OLN>
              <MP_OLS>MT</MP_OLS>
              <MP_OLY>2007</MP_OLY>
              <MP_CAUT_MED>70</MP_CAUT_MED>
              <MP_VISION_SCRIPT>C0RRECTIVE LENSES</MP_VISION_SCRIPT>
              <MP_DNA_AVAIL>N</MP_DNA_AVAIL>
              <CREATED_BY>MMPS</CREATED_BY>
              <DTM_CREATED>31-AUG-06</DTM_CREATED>
              <MI_INC_ID_SEQ>288</MI_INC_ID_SEQ>
              <MP_ALERT>N</MP_ALERT>
         </ROW>

  • How to create XML data source/ and load data from a web service to BI

    All,
    I m trying to find a 'how to' document (or any document) that shows how to create an XML data source to load data directly from a web service or from an XML file.
    I appreciate any help.

    Hi Mike,
    Two more for you:----
    /thread/111488 [original link is broken]
    http://help.sap.com/saphelp_nw70/helpdata/en/e6/1dd53bb90cbb1ae10000000a11402f/content.htm
    Regards,
    Suman

  • How to Create XML Schema From JTree ?

    Please help me... Thank you.
    This is Code
    Tree.java ----- Run This File
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class Tree extends JPanel implements ActionListener {
        private int newNodeSuffix = 1;
        private static String ADD_COMMAND = "add";
        private static String REMOVE_COMMAND = "remove";
        private static String CLEAR_COMMAND = "clear";
        private static String OK_COMMAND = "ok";
        private DynamicTree treePanel;
        public Tree() {
            super(new BorderLayout());
            //Create the components.
            treePanel = new DynamicTree();
            //populateTree(treePanel);
            JButton addButton = new JButton("Add");
            addButton.setActionCommand(ADD_COMMAND);
            addButton.addActionListener(this);
            JButton removeButton = new JButton("Remove");
            removeButton.setActionCommand(REMOVE_COMMAND);
            removeButton.addActionListener(this);
            JButton clearButton = new JButton("Clear");
            clearButton.setActionCommand(CLEAR_COMMAND);
            clearButton.addActionListener(this);
            JButton okButton = new JButton("OK");
            okButton.setActionCommand(OK_COMMAND);
            okButton.addActionListener(this);
            //Lay everything out.
            treePanel.setPreferredSize(new Dimension(300, 150));
            add(treePanel, BorderLayout.CENTER);
            JPanel panel = new JPanel(new GridLayout(0,1));
            panel.add(addButton);
            panel.add(removeButton);
            panel.add(clearButton);
            panel.add(okButton);
            add(panel, BorderLayout.LINE_END);
        /*public void populateTree(DynamicTree treePanel) {
            String p1Name = new String("Parent 1");
            //String p2Name = new String("Parent 2");
            String c1Name = new String("Child 1");
            //String c2Name = new String("Child 2");
            DefaultMutableTreeNode p1;
            p1 = treePanel.addObject(null, p1Name);
            //p2 = treePanel.addObject(null, p2Name);
            treePanel.addObject(p1, c1Name);
            //treePanel.addObject(p1, c2Name);
            //treePanel.addObject(p2, c1Name);
            //treePanel.addObject(p2, c2Name);
        public void actionPerformed(ActionEvent e) {
            String command = e.getActionCommand();
            if (ADD_COMMAND.equals(command)) {
                //Add button clicked.
                treePanel.addObject("New Node " + newNodeSuffix++);
            } else if (REMOVE_COMMAND.equals(command)) {
                //Remove button clicked.
                treePanel.removeCurrentNode();
            } else if (CLEAR_COMMAND.equals(command)) {
                //Clear button clicked.
                treePanel.clear();
            } else if (OK_COMMAND.equals(command)) {
                 //Ok button clicked.
                 treePanel.ok();
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("Craete XML Tree");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Tree newContentPane = new Tree();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }DynamicTree.java
    import javax.swing.JOptionPane;
    import java.awt.GridLayout;
    import java.awt.Toolkit;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    import javax.swing.event.TreeModelEvent;
    import javax.swing.event.TreeModelListener;
    public class DynamicTree extends JPanel {
        protected DefaultMutableTreeNode rootNode;
        protected DefaultTreeModel treeModel;
        protected JTree tree;
        private Toolkit toolkit = Toolkit.getDefaultToolkit();
        public DynamicTree() {
            super(new GridLayout(1,0));
            rootNode = new DefaultMutableTreeNode("Root Node");
            treeModel = new DefaultTreeModel(rootNode);
            treeModel.addTreeModelListener(new MyTreeModelListener());
            tree = new JTree(treeModel);
            tree.setEditable(true);
            tree.getSelectionModel().setSelectionMode
                    (TreeSelectionModel.SINGLE_TREE_SELECTION);
            tree.setShowsRootHandles(true);
            JScrollPane scrollPane = new JScrollPane(tree);
            add(scrollPane);
        /** Remove all nodes except the root node. */
        public void clear() {
            rootNode.removeAllChildren();
            treeModel.reload();
        public void ok() {
             int n = JOptionPane.showConfirmDialog(null, "Do you want to create XML Schema?", "", JOptionPane.YES_NO_OPTION);
        /** Remove the currently selected node. */
        public void removeCurrentNode() {
            TreePath currentSelection = tree.getSelectionPath();
            if (currentSelection != null) {
                DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)
                             (currentSelection.getLastPathComponent());
                MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent());
                if (parent != null) {
                    treeModel.removeNodeFromParent(currentNode);
                    return;
            // Either there was no selection, or the root was selected.
            toolkit.beep();
        /** Add child to the currently selected node. */
        public DefaultMutableTreeNode addObject(Object child) {
            DefaultMutableTreeNode parentNode = null;
            TreePath parentPath = tree.getSelectionPath();
            if (parentPath == null) {
                parentNode = rootNode;
            } else {
                parentNode = (DefaultMutableTreeNode)
                             (parentPath.getLastPathComponent());
            return addObject(parentNode, child, true);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child) {
            return addObject(parent, child, false);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child,
                                                boolean shouldBeVisible) {
            DefaultMutableTreeNode childNode =
                    new DefaultMutableTreeNode(child);
            if (parent == null) {
                parent = rootNode;
            treeModel.insertNodeInto(childNode, parent,
                                     parent.getChildCount());
            //Make sure the user can see the lovely new node.
            if (shouldBeVisible) {
                tree.scrollPathToVisible(new TreePath(childNode.getPath()));
            return childNode;
        class MyTreeModelListener implements TreeModelListener {
            public void treeNodesChanged(TreeModelEvent e) {
                DefaultMutableTreeNode node;
                node = (DefaultMutableTreeNode)
                         (e.getTreePath().getLastPathComponent());
                 * If the event lists children, then the changed
                 * node is the child of the node we've already
                 * gotten.  Otherwise, the changed node and the
                 * specified node are the same.
                try {
                    int index = e.getChildIndices()[0];
                    node = (DefaultMutableTreeNode)
                           (node.getChildAt(index));
                } catch (NullPointerException exc) {}
                System.out.println("The user has finished editing the node.");
                System.out.println("New value: " + node.getUserObject());
            public void treeNodesInserted(TreeModelEvent e) {
            public void treeNodesRemoved(TreeModelEvent e) {
            public void treeStructureChanged(TreeModelEvent e) {
    }

    XML shema is basically an XML file. So u need to know how to create an XML,
    provided u know how the shema file should be.
    Creating an XML :
    http://forum.java.sun.com/thread.jspa?threadID=5181031&messageID=9705786#9705786

Maybe you are looking for