How to validate XML Schema in DOM?

I've got an XML file and corresponding XSD file.
How do I validate this XML file when using DOM parser?
Thanks

You can use the sun msv API.
This multi schema validator can validate documents against different sorts of Schema.
More info at http://wwws.sun.com/software/xml/developers/multischema/

Similar Messages

  • 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 validate XML against XSD and parse/save in one step using SAXParser?

    How to validate XML against XSD and parse/save in one step using SAXParser?
    I currently have an XML file and XSD. The XML file specifies the location of the XSD. In Java code I create a SAXParser with parameters indicating that it needs to validate the XML. However, SAXParser.parse does not validate the XML, but it does call my handler functions which save the elements/attributes in memory as it is read. On the other hand, XMLReader.parse does validate the XML against the XSD, but does not save the document in memory.
    My code can call XMLReader.parse to validate the XML followed by SAXParser.parse to save the XML document in memory. But this sound inefficient. Besides, while a valid document is being parsed by XMLReader, it can be changed to be invalid and saved, and XMLReader.parse would be looking at the original file and would think that the file is OK, and then SAXParser.parse would parse the document without errors.
    <Book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd" name="MyBook">
      <Chapter name="First Chapter"/>
      <Chapter name="Second Chapter">
        <Section number="1"/>
        <Section number="2"/>
      </Chapter>
    </Book>
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Book">
    <xs:complexType>
      <xs:sequence>
       <xs:element name="Chapter" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
         <xs:sequence>
          <xs:element name="Section" minOccurs="0" maxOccurs="unbounded">
           <xs:complexType>
            <xs:attribute name="xnumber"/>
          </xs:complexType>
          </xs:element>
         </xs:sequence>
         <xs:attribute name="name"/>
        </xs:complexType>
       </xs:element>
      </xs:sequence>
      <xs:attribute name="name"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    public class SAXXMLParserTest
       public static void main(String[] args)
          try
             SAXParserFactory factory = SAXParserFactory.newInstance();
             factory.setNamespaceAware(true);
             factory.setValidating(true);
             SAXParser parser = factory.newSAXParser();
             parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
                                "http://www.w3.org/2001/XMLSchema");
             BookHandler handler = new BookHandler();
             XMLReader reader = parser.getXMLReader();
             reader.setErrorHandler(handler);
             parser.parse("xmltest.dat", handler); // does not throw validation error
             Book book = handler.getBook();
             System.out.println(book);
             reader.parse("xmltest.dat"); // throws validation error because of 'xnumber' in the XSD
    public class Book extends Element
       private String name;
       private List<Chapter> chapters = new ArrayList<Chapter>();
       public Book(String name)
          this.name = name;
       public void addChapter(Chapter chapter)
          chapters.add(chapter);
       public String toString()
          StringBuilder builder = new StringBuilder();
          builder.append("<Book name=\"").append(name).append("\">\n");
          for (Chapter chapter: chapters)
             builder.append(chapter.toString());
          builder.append("</Book>\n");
          return builder.toString();
       public static class BookHandler extends DefaultHandler
          private Stack<Element> root = null;
          private Book book = null;
          public void startDocument()
             root = new Stack<Element>();
          public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
             if (qName.equals("Book"))
                String name = attributes.getValue("name");
                root.push(new Book(name));
             else if (qName.equals("Chapter"))
                String name = attributes.getValue("name");
                Chapter child = new Chapter(name);
                ((Book)root.peek()).addChapter(child);
                root.push(child);
             else if (qName.equals("Section"))
                Integer number = Integer.parseInt(attributes.getValue("number"));
                Section child = new Section(number);
                ((Chapter)root.peek()).addSection(child);
                root.push(child);
          public void endElement(String uri, String localName, String qName) throws SAXException
             Element finished = root.pop();
             if (root.size() == 0)
                book = (Book) finished;
          public Book getBook()
             return book;
          public void error(SAXParseException e)
             System.out.println(e.getMessage());
          public void fatalError(SAXParseException e)
             error(e);
          public void warning(SAXParseException e)
             error(e);
    public class Chapter extends Element
       public static class Section extends Element
          private Integer number;
          public Section(Integer number)
             this.number = number;
          public String toString()
             StringBuilder builder = new StringBuilder();
             builder.append("<Section number=\"").append(number).append("\"/>\n");
             return builder.toString();
       private String name;
       private List<Section> sections = null;
       public Chapter(String name)
          this.name = name;
       public void addSection(Section section)
          if (sections == null)
             sections = new ArrayList<Section>();
          sections.add(section);
       public String toString()
          StringBuilder builder = new StringBuilder();
          builder.append("<Chapter name=\"").append(name).append("\">\n");
          if (sections != null)
             for (Section section: sections)
                builder.append(section.toString());
          builder.append("</Chapter>\n");
          return builder.toString();
    }Edited by: sn72 on Oct 28, 2008 1:16 PM

    Have you looked at the XML DB FAQ thread (second post) in this forum? It has some examples for validating XML against schemas.

  • How to validate XML using java_xml_pack-summer-02?

    In jaxp1.1, we validate the xml file in this way:
    c:\java -jar Validator.jar myBookStore.xml
    However, in java_xml_pack-summer-02, which is latest version of jaxp, the Validator.jar is not available. So, how to validate xml file?
    Pls help.

    develop your own validator... here is a quick and dirty one, which spits exceptions when error are met:
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    public class Validator
      public static void main(String[] args) throws Exception {
        SAXParserFactory spf = SAXParserFactory.newInstance();
        spf.setValidating(true);
        spf.setNamespaceAware(true);
        SAXParser sp = spf.newSAXParser();
        sp.parse(new File(args[0]), new DefaultHandler());
    }

  • How to validate xml using xsd

    Hi All
    please tell me how to validate xml using xsd
    regards

    Try using this link:
    = http://www.google.nl/search?q=XML+validate+oracle for instance or
    = use the search button on this forum and / or
    = read the FAQ on this (XML DB FAQ
    Thanks Eddie et all, for educating me via http://awads.net/wp/2006/11/14/barts-punishment-for-asking-dumb-questions (don't mind the URL , the info there is really useful)
    The following link on this site is just brilliant: http://www.albinoblacksheep.com/flash/posting.php
    Grz
    Marco
    Message was edited by:
    mgralike

  • Validate XML Schema

    Hi,
    I need to load some XML schema definitions to afterwards validate some DOM documents against this schemas. My problem is, when loading those XML schema definitions I have to validate them. How to do this? How to provide an javax.xml.validation.Schema object and check is valid XML schema?
    Thanks in advance.

    The very act of loading the schema into a schema object will validate it. That is, if you get as far as having an instance of Schema, it's valid.

  • How to validate xml againest to xsd

    HI,
    Xml contains multiple namespaces , I want validate xml againest to xsd. please any one can give help to me.
    thanks in adwance,

    see the sample code which fulfill ur need...
    /*--------------Validate.java------------------*/
    import java.io.File;
    import java.io.StringReader;
    import javax.xml.XMLConstants;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    import org.xml.sax.SAXException;
    * This sample shows how new Validator APIs can be used to compile a standalone schema. This
    * feature is useful for those applications which are developing schema and wants to check
    * the validity of it as per the rules of schema language.
    *            Once an application has <code>Schema</code> object, it can be used to create
    * <code>Validator</code> which can be used to validate an instance document against the
    * schema or set of schemas this <code>Schema</code> object represents.
    public class Validate
        private static final boolean DEBUG = System.getProperty("debug") != null ? true : false;
        /** Parser the given schema and return in-memory representation of that
         *  schema. Compiling the schema is very simple, just pass the path of schema
         *  to <code>newSchema()</code> function and it will parse schema, check the
         *  validity of schema document as per the schema language, compute in-memory
         *  representation and return it as <code>Schema</code> object. Note that If
         *  schema imports/includes other schemas, those schemas will be parsed too.   
         * @param String path to schema file
         * @return Schema in-memory representation of schema.
        public static Schema compileSchema(String schema) throws SAXException
            //Get the SchemaFactory instance which understands W3C XML Schema language
            SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);      
            if(DEBUG)
                System.out.println("schema factory instance obtained is " + sf);
            return sf.newSchema(new File(schema));
        }//compileSchema 
         * @param args the command line arguments
        public static void main(String[] args)
            try
                //parse schema first, see compileSchema function to see how
                //Schema object is obtained.
                Schema schema = compileSchema("NBO.XSD");
                //this "Schema" object is used to create "Validator" which
                //can be used to validate instance document against the schema
                //or set of schemas "Schema" object represents.
                Validator validator = schema.newValidator();
                //set ErrorHandle on this validator
                validator.setErrorHandler(new MyErrorHandler());
                //Validate this instance document against the instance document supplied
                validator.validate(new StreamSource("NBWO.XML"));           
            } catch(Exception ex)
                ex.printStackTrace();
                System.out.println("GET CAUSE:");
                ex.getCause().fillInStackTrace();
    /*---------MyErrorHandler()-----------*/
    * MyErrorHandler.java
    public class MyErrorHandler implements org.xml.sax.ErrorHandler
        /** Creates a new instance of MyErrorHandler */
        public MyErrorHandler()
        public void error(org.xml.sax.SAXParseException sAXParseException) throws org.xml.sax.SAXException
            System.out.println("ERROR: " + sAXParseException.toString());
            System.out.println("get error Msg : "+sAXParseException.getMessage());
        public void fatalError(org.xml.sax.SAXParseException sAXParseException) throws org.xml.sax.SAXException
            System.out.println("FATAL ERROR: " + sAXParseException.toString());
            System.out.println("get Error Message : "+sAXParseException.getMessage());
        public void warning(org.xml.sax.SAXParseException sAXParseException) throws org.xml.sax.SAXException
            System.out.println("WARNING: " + sAXParseException.toString());
    }With Cheers,
    Prasanna T

  • How read a XML Schema

    Hi,
    i wish to ask you a question: how i can read a XML Schema? Which library i have to use to visit a XML Schema? There are examples on internet? I haven't found anything about it.
    Please help me.
    Thank you, regards
    Gianni

    WXS schemas and RelaxNG schemas have an XML encoding, so any XML parser can read them. ASN1 XML schemas and compact RNG schemas require specialist parsers.
    If you wish to populate a more useful structure than DOM, then Castor has classes to represent and manipulate WXS, though I've not used them myself.
    Pete

  • PL/SQL web service - how to use XML schema to define inputs/outputs?

    Hello,
    let us say I want to publish a PL/SQL web service. The package spec that I want to expose is:
    CREATE OR REPLACE PACKAGE myWebService AS
      FUNCTION loadResults(
        username   IN VARCHAR2,
        password   IN VARCHAR2,
        resultData IN XMLType)
      RETURN XMLType;
    END;When I use JDeveloper's wizard to publish my PL/SQL web service, the resulting WSDL contains this:
    <schema
        xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:tns="http://uk/co/weatherbys/aapws/AAPWS.wsdl/types/"
        targetNamespace="http://uk/co/weatherbys/aapws/AAPWS.wsdl/types/"
        elementFormDefault="qualified">
        <element name="loadresultsElement">
            <complexType>
                <sequence>
                    <element name="username" type="string" nillable="true"/>
                    <element name="password" type="string" nillable="true"/>
                    <element name="resultdata" nillable="true">
                        <complexType>
                           <sequence>
                                <any/>
                             </sequence>
                        </complexType>
                    </element>
                </sequence>
            </complexType>
        </element>
        <element name="loadresultsResponseElement">
            <complexType>
                <sequence>
                    <element name="result" nillable="true">
                       <complexType>
                            <sequence>
                                <any/>
                            </sequence>
                        </complexType>
                    </element>
                </sequence>
            </complexType>
        </element>
    </schema>It is specifying that anything at all can be passed in and out from the two XMLType arguments, which is fair enough: it has no way of knowing what I am expecting and what I shall return.
    My question is, how do I tell JDeveloper that actually I want either or both of those XMLTypes to conform to a particular XML schema?

    You cannot format the date as a string, unless you do the conversion on the PL-SQL side, before you use it in your WebService mapping. It should be handled as a string.
    The only way to convert the XML from SOAP, using this encoding, into literal XML is to apply XSLT to the payload. Not sure why you would like to do this, as the payload should be consumed by another SOAP-awared stack.
    Hope this helps,
    Eric

  • How to populate XML schema details in XSLT output

    I want to print details about XML schema , xmlns on XSLT output as below.
    <?xml version="1.0" encoding="UTF-8"?>
    <CBISEDACReqLogMsg xsi:schemaLocation="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04 CBISEDACReqLogMsg.00.01.04.xsd"
    xmlns="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    But in actual
    In my XSLT output I can see below.
      <?xml version="1.0" encoding="UTF-8" ?>
    - <CBISEDACReqLogMsg xmlns="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04">
    My XSLT is as code is below
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:calendar="http://www.oracle.com/XSL/Transform/java/java.util.Calendar"
    xsl:schemaLocation="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04 CBISEDACReqLogMsg.00.01.04.xsd"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04"
    xmlns:string="http://www.oracle.com/XSL/Transform/java/java.lang.String"
    exclude-result-prefixes="calendar string">
      <xsl:output method="xml" indent="yes" encoding="UTF-8"></xsl:output>
      <xsl:template match="/">
    Kindly help me for how to show other required details in XSLT output.

    I am in the same boat. How do I disable XML Validation in NW BPM?
    In my case, Data comes from PI to NW BPM. But PI never cares about schema validation unless asked for. I have at least a 100 WSDLs that are failing to receive messages if I could not turn this off in BPM. I can not fix the Data Type as it is supported by third party.
    Any help is appreciated.
    VJ

  • How to read xml schema in java?

    hello,
    i need to read the xml schema file,and extract the details like element types.i need to read it not validate it .
    thank you.

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

  • How to change XML Schema in MDM Console?

    Hi Experts,
    My scenario: SRM send products to MDM Catalog using PI.
    I need to change the XML Schema (XSD) for processing some new fields that don't exist in Catalog. So I created a copy of the XSD file in my station and made the necessary changes.
    In XML Schema (MDM Console), I changed the FileName for getting the XSD I created.
    But when I tested SRM Shopping Cart again, this couldn't access the products in Catalog anymore.
    1) After my chage the FileName shows the name with "c:\Documents and Settings\...". Does it work?? Is this the cause of the error?
    2) Do you know why my change affect the Shopping Cart access to the products in the Catalog?
    3) Now I don't know how to undo my change in FileName. I can't do it because in the FileName MDM Console it doesn't allow to write it. It allows only to choose a file in some place, my station for example.
    Could anyone help me?
    Thanks!
    Rose

    Hi Kanstantsin,
    I was analysing what you explain, but it was not exactly this problema. But what you wrote, help me to understand better the MDM and lets me know more about schemas .
    Thank you very much for your help.
    Hi Vinary,
    It was exactly this. I had edited the name. I changed it and now it is working.
    Thank you very much for your help!
    Rose

  • 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

  • Switching ON validate xml(Schema Validation) in BPEL Console for AIAtesting

    While we were testing Oracle O2B pip, we have recently switched on schema validation by turning it on to 'Strict' so that we can Validate
    XML in BPEL Console. Earlier when we were testing we had turned the schema validation as 'None' on BPEL console, and hence everything was working fine and
    no errors we popping out while creating sales order in Siebel CRM. But the moment we put validate xml to ' Strict' it starts throwing validation errors.
    So can you please help us to know whether it is right to test the Oracle O2B pip by putting validate xml to 'Strict'? If it is fair to test it by switching
    ON Validate XML(putting validate xml to 'Strict') then we are getting below error.
    We are creating a new sales order in Siebel CRM and when we check in BPEL console it was faulted at UpdateSalesOrderSiebelCommsProvABCSImpl (v. 1.0) .When we checked the BPEL flow it is throwing error at InvokeUpdateUpsert.
    Error is According to the xml schemas, the xml document is invalid. The reason is: Error::cvc-complex-type.2.4.a: Invalid content was found starting with element 'xsdLocal1:Process_spcInstance_spcId'. One of '{"http://siebel.com/asi":Process_spcInstance_spcId}' is expected.
    Steps for Switching on Validation ?
    1)     Login to BPEL Console
    2)     Go To Configuration section
    3)     Schema Validation changes
    a.     ON: populate validateXML with value strict
    b.     OFF: populate validateXML with value none
    Really appreciate if you can help..

    hi
    Indeed, the "Validate XML" menu option only shows "Validate XML: 0 errors, 0 warnings.".
    But, if you look at the "Design" tab for your schema, the "invoices" element node contains an "xsd:invoice" sequence shown in red. If you change "xsd:invoice" to "invoice" this becomes white and the node can be expanded.
    One other thing, registering an XML Schema in JDeveloper like the one you posted, isn't possible without an "oracle.xml.parser.schema.XSDException" (without further details).
    regards
    Jan Vervecken

  • How to deploy XML schemas a web application?

    Hi,
    I have a couple of XML schemas in the project, which I want to import them into my BPEL using http url.
    How can I deloy XML schemas as a web application.
    Any inputs are appreciated.
    Thanks.
    ~V~

    You already asked this question:
    http://forum.java.sun.com/thread.jspa?threadID=5150005&messageID=9561597
    Obviously running notepad on the clients PC is not possible (ignoring active x)

Maybe you are looking for