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

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 Default Schema from within the application

    Hi friends
    I am creating users using the following within my application using this syntax
    BEGIN
    APEX_UTIL.CREATE_USER
    (:P124_USER_ID, :P124_USER_NAME,:P124_USER_FIRST_NAME,:P124_USER_LAST_NAME,' ',:P124_USER_EMAIL_ID,'xxxx');
    END;
    The default workspace for the user is set as blanks. I would like to set it to be the default workspace as per the current logged in user.
    Can you help me with the syntax for this
    thank you in advance
    Laxmi

    Laxmi,
    The subject of the post is "How to create Default Schema from within the application".
    But your question asks how to set the "default workspace" for a newly created user.
    Those are different questions and not the ones I think you need answered.
    Let me answer this question "How can you set the default schema for an account when creating the account and set it to the same value used for the default schema attribute of the administrator account used to authenticate to the currently running application?".
    In the apex_util.create_user call use named parameter notation and fetch the information about the currently logged-in user first, e.g.,declare
      l_workspace               varchar2(256);
      l_user_name               varchar2(256);
      l_first_name              varchar2(256);
      l_last_name               varchar2(256);
      l_web_password            varchar2(256);
      l_email_address           varchar2(256);
      l_start_date              varchar2(256);
      l_end_date                varchar2(256);
      l_employee_id             varchar2(256);
      l_allow_access_to_schemas varchar2(256);
      l_person_type             varchar2(256);
      l_default_schema          varchar2(256);
      l_groups                  varchar2(256);
      l_developer_role          varchar2(256);
      l_description             varchar2(256);
    begin
    apex_util.fetch_user (
      p_user_id                  => apex_util.get_current_user_id,
      p_workspace                => l_workspace,
      p_user_name                => l_user_name,
      p_first_name               => l_first_name,
      p_last_name                => l_last_name,
      p_web_password             => l_web_password,
      p_email_address            => l_email_address,
      p_start_date               => l_start_date,
      p_end_date                 => l_end_date,
      p_employee_id              => l_employee_id,
      p_allow_access_to_schemas  => l_allow_access_to_schemas,
      p_person_type              => l_person_type,
      p_default_schema           => l_default_schema,
      p_groups                   => l_groups,
      p_developer_role           => l_developer_role,
      p_description              => l_description);
    apex_util.create_user(
      p_user_id        => :P124_USER_ID,
      p_user_name      => :P124_USER_NAME,
      p_first_name     => :P124_USER_FIRST_NAME,
      p_last_name      => :P124_USER_LAST_NAME,
      p_email_address  => :P124_USER_EMAIL_ID,
      p_web_password   => 'xxxx',
      p_default_schema => l_default_schema);
    end;Scott

  • Creating xml schema from database attributes

    Hi,
    I am trying to generate dynamic xml schemas from a java program.
    Please suggest me some solutions.
    The scenario is like this.
    The input to the java program is a table[oracle] name
    and based on that table's column headers, i need to define and
    create the xml schema dynamically.
    The purpose is that at a later point of time, i may
    need to copy the content of the database to xml files.
    Please reply with your suggestions.
    Thanks in advance,
    Dilip

    XML Schema itself is a well formed XML document. You can write a small utility class which can do this for you by using any XML API available in Java.
    Thanks,
    Tejas

  • How to read XML schema from databank to post it in WebService Test

    Hi Guys,
    Does anyone have a solution to read the XML schema from databank (.csv file) and post it in a Web Service test case.
    I mean by using utilities.loadXML, something like that?

    SAXParserFactory spf = SAXParserFactory.newInstance();
    spf.setNamespaceAware(true);
    XMLReader xmlReader = spf.newSAXParser().getXMLReader();
    and set the content handler

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

  • Creating XML Schema from tables With Constraints

    Greetings,
    I'd have an interesting question. I finally am getting familiar with the various kinds of xml solutions provided by the oracle database, but hey here I have another interesting question I can't seem to get into life. I'm currently generating XML Schemas (XSD) from the tables of my database. Its nice its cool however I'd need to have the table's constraints with the xsd:elements also. And heres my problem, I can't seem to insert the table constrains. I'll show you what I mean:
    <xsd:element name="MESSAGE_TABLE">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="MESSAGE_RECORD">
            <xsd:complexType>
              <xsd:all>
                <xsd:element name="ID" type="xsd:integer" minOccurs="1" />
                <xsd:element name="HEADER">
                  <xsd:simpleType>
                    <xsd:restriction base="xsd:string>
                      <xsd:maxLength value="255" />
                    </xsd:restriction>
                  </xsd:simpleType>
                </xsd:element>
              </xsd:all>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
      </xsd:complexType>
      <!-- I'd need some more things here like... -->
      <!-- Primary key(s) -->
      <xsd:key name="PK_ID_PRIM">
        <xsd:selector xpath="." />
        <xsd:field xpath="ID" />
      </xsd:key>
      <!-- Foreign key(s) -->
      <xsd:keyref name="FK_HEADER_FOREIGN" refer="PK_HEADER_ID">
        <xsd:selector xpath="HEADER" />
        <xsd:field xpath="ID" />
      </xsd:keyref>
      <!-- Unique constraint(s) -->
      <xsd:unique name="UQ_..." ... />
      </xsd:unique>
    </xsd:element>That would fit my business needs, however I may be so blind that I can't see the forest from the tree. Currently I got so far that:
              xmlElement
                  "xsd:schema",
                  xmlAttributes
                      'http://www.w3.org/2001/XMLSchema'      as "xmlns:xsd"
                  xmlElement
                    "xsd:element",
                    xmlAttributes
                      target_table                            as "name"
                    xmlElement               
                      "xsd:complexType",
                      xmlElement
                        "xsd:sequence",
                        xmlElement
                          "xsd:element",
                          xmlAttributes
                            target_table || '_RECORD'         as "name",
                            'unbounded'                       as "maxOccurs"
                          xmlElement
                            "xsd:complexType",
                            xmlElement
                              "xsd:sequence",
                                xmlAgg(ELEMENT)
                    xmlElement
                      "xsd:Key",
                )As you can see this won't be good since I have put a single xml element in there. I guess I'd need something more like an xmlAgg(CONSTRAINTS), however in that case I'm wondering how will the select's FROM part look like.
      FROM
        SELECT  table_name, internal_column_id,
                CASE
                  WHEN data_type IN ('VARCHAR2', 'CHAR')
                  THEN
                    xmlElement
                      "xsd:element",
                      xmlattributes
                        column_name as "name",
                        decode(NULLABLE, 'Y', 0, 1) as "minOccurs"
                      xmlElement
                        "xsd:simpleType",
                        xmlElement
                          "xsd:restriction",
                          xmlAttributes
                            'xsd:string' as "base"
                          xmlElement
                            "xsd:maxLength",
                            xmlAttributes
                              DATA_LENGTH as "value"
                  WHEN data_type = 'DATE'
                  THEN
                    xmlElement
                      "xsd:element",
                      xmlattributes
                        column_name as "name",
                        'xsd:date' as "type",
                        decode(NULLABLE, 'Y', 0, 1) as "minOccurs"
                  WHEN data_type = 'NUMBER'
                  THEN
                    xmlElement
                      "xsd:element",
                      xmlattributes
                        column_name as "name",
                        decode(DATA_SCALE, 0, 'xsd:integer', 'xsd:double') as "type",
                        decode(NULLABLE, 'Y', 0, 1) as "minOccurs"
                  ELSE
                    xmlElement
                      "xsd:element",
                      xmlattributes
                        column_name as "name",
                        'xsd:anySimpleType' as "type",
                        decode(NULLABLE, 'Y', 0, 1) as "minOccurs"
        end ELEMENT
        FROM user_tab_cols c
        WHERE TABLE_NAME = target_table
        ORDER BY internal_column_id
      GROUP BY TABLE_NAME;Thank you very much for all your help!
    Regards,
    Joey
    Edited by: Wrath#87 on 2012.09.05. 22:15

    Thanks for that, answer. That helped me a lot managing primary constraints. However I still have problems managing foreign keys. I come up with the following formula:
              xmlElement
                  "xsd:schema",
                  xmlAttributes
                      'http://www.w3.org/2001/XMLSchema'      as "xmlns:xsd"
                  xmlElement
                      "xsd:element",
                      xmlAttributes
                          upper(target_table) as "name"
                      xmlElement
                          "xsd:complexType",
                          xmlElement
                            "xsd:all",
                                xmlAgg(ELEMENT)
                          SELECT    xmlElement
                                      "xsd:key",
                                      xmlattributes
                                        uc.constraint_name as "name"
                                      xmlElement
                                        "xsd:selector",
                                        xmlattributes
                                          '.' as "xpath"
                                      xmlAgg
                                        xmlElement
                                          "xsd:field",
                                          xmlattributes
                                            ucc.column_name as "xpath"
                                        order by ucc.position
                          FROM      user_constraints uc
                                    JOIN      user_cons_columns ucc
                                    ON        ucc.constraint_name   =   uc.constraint_name
                          WHERE     uc.table_name                   =   upper(target_table)
                          AND       uc.constraint_type              =   'P'
                          GROUP BY  uc.constraint_name
                          SELECT    xmlElement
                                        "xsd:keyRef",
                                        xmlattributes
                                            a.constraint_name as "name"
                                        xmlElement
                                            "xsd:selector",
                                            xmlattributes
                                                c.table_name as "xpath"
                                        xmlAgg
                                            xmlElement
                                                "xsd:field",
                                                xmlattributes
                                                    d.column_name as "xpath"
                                            order by  c.table_name
                          FROM      all_constraints   a,
                                    all_cons_columns  b,
                                    all_constraints   c,
                                    all_cons_columns  d
                          WHERE     a.constraint_name   =   b.constraint_name
                          AND       a.constraint_name   =   c.r_constraint_name
                          AND       c.constraint_name   =   d.constraint_name
                          AND       a.table_name        =   upper(target_table)
              )This gives me the following error message: 00937. 00000 -  "not a single-group group function"

  • How to create xml file from original

    I have this complicated xml and I want to search through it and make a new xml with only element I find that match. what is the best way to do this? the file
    is about 6mb and I want to read the whole file easily..should i load to database table and create a file from table? I have found issues reading the file..
    - <ArrayOfJobClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <JobClass>
    - <Triggers>
    - <TriggerClass>
    <ExpireActionType>Delete</ExpireActionType>
    <ExpireType>DateTime</ExpireType>
    <TriggerType>TimeType</TriggerType>
    - <TTime>
    <TimeTriggerType>Custom</TimeTriggerType>
    <IntervalType>Daily</IntervalType>
    <SpecificType>Days</SpecificType>
    <FirstLastType>First</FirstLastType>
    <IntervalValue>1</IntervalValue>
    <FirstLastWeekDay>Monday</FirstLastWeekDay>
    <InitDate>2009-05-04T14:17:05.40625-07:00</InitDate>
    - <IntervalDays>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>
    <boolean>false</boolean>

    You can load it in the database in an XMLType table (Object-Relational or Binary XML storage), use XQuery on the XML content and then write back the result to a file.
    Or, you might just use an external processor (XSLT or XQuery).
    If you want to stay in the Oracle world, you can use :
    - For XSLT : $ORACLE_HOME/bin/oraxsl (it's a wrapper for the java XSLT engine)
    - For XQuery : the java XQuery API
    Personally, I sometimes use the Saxon XSLT and XQuery processor, quite efficient.
    Here's a simplistic example with oraxsl utility :
    emp.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <emps>
      <emp id="7369">
        <name>SMITH</name>
        <job>CLERK</job>
        <salary>800</salary>
      </emp>
      <emp id="7499">
        <name>ALLEN</name>
        <job>SALESMAN</job>
        <salary>1600</salary>
      </emp>
      <emp id="7521">
        <name>WARD</name>
        <job>SALESMAN</job>
        <salary>1250</salary>
      </emp>
      <emp id="7566">
        <name>JONES</name>
        <job>MANAGER</job>
        <salary>2975</salary>
      </emp>
      <emp id="7654">
        <name>MARTIN</name>
        <job>SALESMAN</job>
        <salary>1250</salary>
      </emp>
    </emps>
    emp.xsl
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:template match="text()"/>
    <xsl:template match="emps/emp[job='SALESMAN']">
      <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:stylesheet>Applying the transformation to search and extract all "salesmen" :
    D:\ORACLE\test>%ORACLE_HOME%\bin\oraxsl emp.xml emp.xsl result.xml
    D:\ORACLE\test>type result.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <emp id="7499">
        <name>ALLEN</name>
        <job>SALESMAN</job>
        <salary>1600</salary>
      </emp><emp id="7521">
        <name>WARD</name>
        <job>SALESMAN</job>
        <salary>1250</salary>
      </emp><emp id="7654">
        <name>MARTIN</name>
        <job>SALESMAN</job>
        <salary>1250</salary>
      </emp>

  • How to create XML string from BPM Business Object?

    Hello,
    I have a business object in my BPM project and I need to transform it in a XML string:
    From:
    Business Object: Customer
    Properties:          Name, Age
    To:
    "<Customer><Name>Robert</Name><Age>17</Age></Customer>"
    How can I do this?
    Thanks.

    Hello,
    I have a business object in my BPM project and I need to transform it in a XML string:
    From:
    Business Object: Customer
    Properties:          Name, Age
    To:
    "<Customer><Name>Robert</Name><Age>17</Age></Customer>"
    How can I do this?
    Thanks.

  • How to create XML file from 1 oracle tab .

    I'M NEW IN ODI
    Step1: Target XML format
    - <Customers>
    - <UserInfo> 
    <UserID>0000000000202406</UserID> 
    <LegalEntityCode>0USAL</LegalEntityCode> 
    <BranchCode>001</BranchCode> 
    <LegalEntity>>0USAL</LegalEntity> 
    <BranchCode>001</BranchCode> 
    <TypeOfChange>123jkl</TypeOfChange> 
    - <CustomerDetails> 
    - <MasterData> 
    <RelationshipManager>jkiu123</RelationshipManager> 
    <CustomerID /> 
    <GroupCustomerID>0000000000202406</GroupCustomerID> 
    <FirstName>sdfgh</FirstName> 
    <LastName>dhgfs</LastName> 
    <CustomerType>c</CustomerType> 
    <CustomerSubType>fitz</CustomerSubType> 
    <SAE>430</SAE> 
    <DoubleCitizenship>NA</DoubleCitizenship> 
    <TelephoneNumber>NA</TelephoneNumber> 
    <Citizenship>NA</Citizenship> 
    <TIN>NA</TIN> 
    <Language>GB</Language> 
    <BirthCountryCode>AL</BirthCountryCode> 
    <BirthCountry>ALB</BirthCountry> 
    <DateOfBirth>NA</DateOfBirth> 
    </MasterData>
    </CustomerDetails>
    </UserInfo>
    </Customers>
    Step 2. Specified the logical and physical schema FOR XML.
    jdbc:snps:xml?f=V:\MYFILE.xml&d=V:\MYFILE.DTD&s=FXML
    where schema and work schema are the same: FXML
    Step3.Logged into Designer and reverse engineered from the the schema created in step2.
    step 4. Following Hierarchy is created:
    CUSTOMERSUSERINFOCUSTOMERDETAILSMASTERDATA
    PLEASE HELP ME WITH EXPLANATIONS  IN DETAILS!!!
    T.Y. IN ADVANCE

    Hi
    You can follow below link
    http://www.avioconsulting.com/blog/oracle-odi-11g-elt-oracle-db-xml
    and which version of ODI you are using i mean ODI 11g or ODI 12C etc.

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

  • How to create Inbound Idoc from XML file-Need help urgently

    Hi,
    can any one tell how to create inbound Idoc from XML file.
    we have xml file in application server Ex. /usr/INT/SMS/PAYTEXT.xml'  we want to generate inbound idoc from this file.we are successfully able to generate outbound XML file from outbound Idoc by using the XML port. But not able to generate idoc from XML file by using we19 or we16.
    Please let me know the process to trigger inbound Idoc with out using  XI and any other components.
    Thanks in advance
    Dora Reddy

    Hi .. Did either of you get a result on this?
    My question is the same really .. I am testing with WE19 and it seems SAP cannot accept an XML inbound file as standard.
    I see lots of mention of using a Function Module.
    Am I correct in saying therefore that ABAP development is required to create a program to run the FM and process the idoc?
    Or is there something tht can be done with Standard SAP?
    Thanks
    Lee

  • Create XML file from ABAP with SOAP Details

    Hi,
    I am new to XML and I am not familiar with JAVA or Web Service. I have searched in SDN and googled for a sample program for creating XML document from ABAP with SOAP details. Unfortunately I couldn't find anything.
    I have a requirement for creating an XML file from ABAP with SOAP details. I have the data in the internal table. There is a Schema which the client provided and the file generated from SAP should be validating against that Schema. Schema contains SOAP details like Envelope, Header & Body.
    My question is can I generate the XML file using CALL TRANSFORMATION in SAP with the SOAP details?
    I have tried to create Transformation (Transaction XSLT_TOOL) in SAP with below code. Also in CALL transformation I am not able to change the encoding to UTF-8. It's always show UTF-16.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
          <SOAP:Header>
            <CUNS:HeaderInfo>
              <CUNS:InterfaceTypeId>10006</InterfaceTypeId>
              <CUNS:BusinessPartnerID>11223344</BusinessPartnerID>
              <CUNS:SchemaVersion>1.0</SchemaVersion>
              <CUNS:DateTime>sy-datum</DateTime>
            </CUNS:HeaderInfo>
          </SOAP:Header>
          <SOAP:Body>
            <xsl:copy-of select="*"/>
          </SOAP:Body>
        </SOAP:Envelope>
      </xsl:template>
    </xsl:transform>
    In ABAP program, I have written below code for calling above Transformation.
      call transformation ('Z_ID')
           source tab = im_t_output[]
           result xml xml_out.
      call function 'SCMS_STRING_TO_FTEXT'
        exporting
          text      = xml_out
        tables
          ftext_tab = ex_t_xml_data.
    Please help me how to generate XML file with SOAP details from ABAP. If anybody have a sample program, please share with me.
    Is there any easy way to create the XML file in CALL Transformation. Please help.
    Thanks

    Try ABAP forum, as it seems not to be PI related.

  • Create XML File from a specified XSD file

    Hi,
    I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
    So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?
    Thanks.

    Hi,
    I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
    So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?
    Thanks.

  • Creating mysql schema from pojo with hibernate using netbeans

    I have been fortunate in finding some good tutorials on how to create POJOs from database schema using hibernate (e.g. http://netbeans.org/kb/docs/web/hibernate-webapp.html).
    Does anyone know of tutorials on creating database schemas from POJOs -- preferable using netbeans? Even the very smallest tutorial with one table or two related tables will do.

    961389 wrote:
    I have been fortunateNot really, that is not rare information.
    Does anyone know of tutorials on creating database schemas from POJOs -- preferable using netbeans? Even the very smallest tutorial with one table or two related tables will do.Netbeans has little to do with the creation of the schema, it's the container that's usually configured to do it. You can use the "hibernate.hbm2ddl.auto" property to control whether the DDL is created from the entities automatically.

Maybe you are looking for

  • Clicking add button to display the values

    requrement is like this Could anyone give suggestions with some code . we have lovs using this one we are searching for the value(ex emloyee name) that value is returned to the base page filed like message text input . we have add button, when ever w

  • XI scenario for Local PO - Email to be sent  to SC  requester

    Hi all, We are running  on SRM 5.0 (Standalone scenario).We are sending the local PO to the vendor system thorugh XI(SRM>XI>Vendor system). My reqt is when the PO is sent to the vendor system,a response/message  is sent to XI that the PO has been del

  • Amount field is not populating properly

    Expert's, Here is an issue where one of the amount field not populating properly.For some opportunities the amount field will be just displyed as'0' but for some opprtunities the amount field is displaying as'$0'.The data we are pulling is from CRM.

  • Using built in camera as motion triggered security camera

    I live in an apartment and suspect that some of the staff have come in and have been rooting through some of my files (paper ones) and playing some of my music instruments. Not at all paranoid, things have really been moved around. What reliable soft

  • Need help with update statement with multiple joins

    I've got the following select statement that is pulling 29 records: SELECT PPA.PROJECT_ID, PPA.SEGMENT1, peia.expenditure_item_id, peia.expenditure_type, pec.expenditure_comment FROM PA.PA_PROJECTS_ALL PPA, pa.pa_expenditure_items_all peia, pa.pa_exp