Validate XML is disabled

Hi,
I have a simple XML file with a internal DTD. I want to validate the XML file against this internal DTD. Following is the XML file with the internal DTD. Can you please let me know, why is the Validate XML disabled.
<?xml version='1.0' encoding='windows-1252'?>
<!DOCTYPE name_details [
<!ELEMENT name_details (first_name, middle_name, last_name, e_num)>
<!ELEMENT first_name (#PCDATA) >
<!ELEMENT middle_name (#PCDATA)>
<!ELEMENT last_name (#PCDATA)>
<!ELEMENT e_num (#PCDATA)>
]>
<name_details>
<first_name>fn=John</first_name>
<middle_name>mi=Smith</middle_name>
<last_name>ln=Putt</last_name>
<emp_number>e_num=988-987-898</emp_number>
</name_details>
Thanks
kiran

"The Validate XML command will validate the XML against a schema registered with JDeveloper defined in the XML file. To register a schema with JDeveloper choose Tools> Preferences> XML Schemas. This command on the context menu is disabled whenever an XML file does not have an XML namespace defined. "

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 Digital Signature with XML DB (o PL/SQL) in Oracle 11g

    Hi,
    Do you know if there is possibility to validate XML Digital Signature using XML DB (or PL/SQL) in Oracle 11g?
    Let say I have CLOB/XMLType containing Digitally Signed XML, and I want to validate, that thsi is proper signature. I also have public key of signer (I could store it in CLOB or file or Oracle wallet).
    Is it possible to do?
    If there is need to install additional component - then which one?
    Regards,
    Paweł

    Hi,
    this is what i got from someone...
    but the links he gave are not opening up...
    u have to place a picture there and have to load the digital signatures as Jpegs on to the server to OA top
    and have to refer them in the XML for dynamically get the signature on the reports
    when u select the properties of the picture placed in the XML template,
    there will be one tab with "URL"... in that u have to give the path for that jpegs
    Pls refer the following documents for enabling digital signature on pdf documents.
    http://iasdocs.us.oracle.com/iasdl/bi_ee/doc/bi.1013/e12187/T421739T481159.htm#5013638    (refer section 'Adding or Designating a Field for Digital Signature'
    http://iasdocs.us.oracle.com/iasdl/bi_ee/doc/bi.1013/e12188/T421739T475591.htm#5013688
    (Implementing a Digital Signature
    Is the BI Publisher installed on your instance of version 10.1.3.4 or higher?
    Pls procure a digital signature as soon as possible. The process can take time. OR we could use any certificate that you already might have OR generate a certificate using Oracle Certificate Authority for demo.

  • Validate XML using XSD (XML Schema)

    Hi experts.
    Is there any way in ABAP to validate XML file against specified XSD file?
    I found only possibility to validate against DTD, but no XSD. As far as I know this is only possible in Java, or is a part of XI. Is it doable without Java or XI (on NetWeaver 2004s)?
    Help appreciated (and rewarded).
    Regards, Frantisek.

    Hello
    Perhaps you missed this link: [How to Perform XML Validations in SAP NetWeaver Process Integration 7.1|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83df1]
    Regards
      Uwe

  • Validate XML with Schema?

    So, according to Adobe...
    quote:
    Dreamweaver CS3 continues to support not only the creation
    and editing of XML and XSL files, but it also allows you to import
    DTDs and schemas and to validate XML documents.
    Does anyone know how to accomplish this task? Adobe's
    documentation on this topic seems be less current than their
    marketing material.
    I mean, I'm assuming from the way this is worded it means
    that you can "import DTDs and schemas and ... validate XML
    documents"
    with said schemas. Or is this just some shifty marketing
    trickery which really means you can import (i.e., open) a DTD or
    schema, and, as a completely unrelated task, you can "validate"
    your XML file - to the extent that Dreamweaver will tell you if you
    forgot to close a tag?

    I tried to move all the xml, class and xsd files in the same folder and it still didn't work...
    And I can't hard coded the xsd file on the document... so the only way is to set the xsd location inside the java codes... here's what I have:
    static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
    static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
    static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
    File xsdFile = new File("schema.xsd");
    saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
    saxParser.setProperty(JAXP_SCHEMA_SOURCE, xsdFile);
    Please help... thx.

  • Validate XML against  one DTD

    Hello
    I have several XML files and into this XML files there is not th DTD call.
    i have another file, the DTD.
    There is any method or code example for, without modify the XML files for including the DTD call, validate the XML againts one DTD?
    thanks

    Alice (guest) wrote:
    : Hi! I have obtained the v2 parser for java and the one for
    plsql.
    : I want to validate xml documents against a DTD file provided
    by
    : another program. I can't find any sample code that does setDTD
    : for validation.
    : Can you tell me how it can be done, please?
    : Thanks in advance!
    The method to set the DTD is setDoctype().
    Stub code follows:
    // Test using InputSource
    parser = new DOMParser();
    parser.setErrorStream(System.out);
    parser.showWarnings(true);
    FileReader r = new FileReader(args[0]);
    InputSource inSource = new InputSource(r);
    inSource.setSystemId(createURL(args[0]).toString());
    parser.parseDTD(inSource, args[1]);
    dtd = (DTD)parser.getDoctype();
    r = new FileReader(args[2]);
    inSource = new InputSource(r);
    inSource.setSystemId(createURL(args[2]).toString());
    parser.setDoctype(dtd);
    parser.setValidationMode(true);
    parser.parse(inSource);
    doc = (XMLDocument)parser.getDocument();
    doc.print(new PrintWriter(System.out));
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Validate  XML against  XML Shema while marshalling/Unmarshalling in JAXB?.

    Hi,
    Can i validate XML documents against XML Shema when i marshall/unmarshall the same using JAXB API?.
    Thanks

    Well, it is weird, but, the code below works when validating the NonEmptyString type:
    XmlSchemaSet schemaSet = new XmlSchemaSet();
    schemaSet.Add(null, "LogConfig.xsd");
    XDocument doc1 = XDocument.Load("LogConfig.xml");
    doc1.Validate(schemaSet, new ValidationEventHandler(ValidationCallBack), false);
    However, if I leave the <LogName> empty it does not valid the values set on xsd fixed attribute, 
    The solution?
    Well, I'm validating the same xml twice, the code above and the code on my first question.

  • HOW TO USE isSchemaValid() in oracle 9i to validate XML against XSD

    Hi
    I am trying to validate xml file against xsd in oracle 9i.The steps are as follows:
    *1.Created directory for xml and xsd file location:*
    CREATE or replace DIRECTORY XML_DATA AS 'D:\prod\sample xml and xsd;
    *2.Register the schema*
    DECLARE
    bf5 BFILE;
    BEGIN
    -- Register the schema
    dbms_lob.filecloseall;
    bf5 := BFILENAME('XML_DATA','xml1.xsd');
    DBMS_XMLSCHEMA.registerSchema('http://www.example.com/schemas/ipo.xsd',bf5,TRUE, TRUE, FALSE,TRUE,TRUE);
    -- dbms_lob.fileclose(bf5);
    END;
    *3.creatibg table to store xml files*
    CREATE TABLE po_tab2 (id NUMBER,xmlcol SYS.XMLType) ;
    *4.Inserting xml file into the table and validating that file with xml schema*
    declare
    aa clob:=' ';
    b varchar2(4000);
    c xmltype;
    begin
    dbms_lob.filecloseall;
    aa:= GETCLOBDOCUMENT('XML_DATA','example.XML','WE8MSWIN1252');
    INSERT INTO po_tab2 (ID, XMLCOL)
    VALUES
    (104,sys.XMLType.createXML(aa));
    commit;
    --c:=sys.xmltype.createXml(aa);
    c:=xmltype(aa);
    b:=VerifyXML(c,'http://www.example.com/schemas/ipo.xsd');
    dbms_output.put_line(b);
    end;
    _5.VerifyXML function is:_
    create or replace
    function VerifyXML( xml xmltype, xmlSchema varchar2 ) return varchar2 AUTHID DEFINER is
    xmlURL varchar2(4000);
    begin
    select
    s.qual_schema_url into xmlURL
    from user_xml_schemas s
    where s.schema_url = xmlSchema;
    if xml.isSchemaValid(xmlURL,'ManageRolloutRegionNotification') =1 then
    return( 'Valid. The supplied XML complies with XSD '||xmlURL );
    else
    -- return null;
    return(sqlcode|| 'Failed. The supplied XML does not comply with XSD '||xmlURL );
    end if;
    exception when others then
    return(sqlcode);
    end;
    _6.PROBLEM:_
    the problem is the function is always returning 'Failed ' status even though I am giving the correct file.. Is there any method to find the reason for failure. These codes are working fine oracle 11g. currently i am working in 9i version 9.2.0.1.0. I

    Oracle 9iR2 is not supported anymore.
    Oracle 9.2.0.8 is in sustained support.
    Oracle 9.2.0.1 is not supported at all.
    Upgrade to 11gR2.
    Sybrand Bakker
    Senior Oracle DBA

  • 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 with complextype schema without root element!

    Hi All!
    I have a problem that. I want to validate a xml data of complextype but the schema i want to validate is[b] not have root element.
    For example:
    The schema like that
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="www.thachpn.test" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="www.thachpn.test" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:complexType name="Name">
              <xs:sequence>
                   <xs:element name="FirstName" type="xs:string"/>
                   <xs:element name="LastName" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>
    and the xml data i want to validate like this
    <?xml version="1.0" encoding="UTF-8"?>
    <Name xmlns="www.thachpn.test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <FirstName>Pham</FirstName>
         <LastName>Thach</LastName>
    </Name>
    My Algorithm is like that:
    I create a complextype object by above schema
    then i create new element with given name and namespace
    after that i use schema of this element to validate xml data.
    I use xmlparserv2 lib of oracle
    But i can not find how to create complextype from schema or create element with have complextype.
    Please help me.
    Thanks a lot!

    <?xml version="1.0" encoding="UTF-8"?>
    Modify the schema.
    Add a root element.
    <xs:schema targetNamespace="www.thachpn.test" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="www.thachpn.test" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:element name="Name" type="Name"/>
    <xs:complexType name="Name">
    <xs:sequence>
    <xs:element name="FirstName" type="xs:string"/>
    <xs:element name="LastName" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>

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

  • Which tech is for validate xml to specific xml schema at runtime

    I got a request.
    we have input xml, we have the xml schema.
    we need to validate xml and see if it follows the schema at run time.
    which tech is good and pupolar for this request in the market
    Thanks.
    Jack Tie

    JDK 1.5:
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setNamespaceAware(true);
        factory.setValidating(true);
        factory.setAttribute(
                "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
                XMLConstants.W3C_XML_SCHEMA_NS_URI);
        factory.setAttribute(
                "http://java.sun.com/xml/jaxp/properties/schemaSource",
                urlAsString);
        DocumentBuilder builder = newDocumentBuilder(factory);
        builder.setErrorHandler(errorHandler);
        builder.parse();

  • I am wondering if there is a way to validate XML file without using .......

    I am wondering if there is a way to validate XML file without using the <!DOCTYPE... but pass in the location of the schema/DTD file as a parameter to a validating method?
    thanks

    None that I know of. The only thing close is to use the EntityResolver interface where you can modify the location of the DTD file before it's being loaded and parsed, but that requires a <!DOCTYPE ...> in the XML file.
    Good luck.

Maybe you are looking for

  • Issue with web links in PDF document using adobe reader 10.1.1

    Hi, We are creating the PDF documents that contains website links. The problem that is occurring is whenever we click on the website links in the pdf file, it opens up IE browser but just show connecting message without actually showing the link and

  • Several white spots in the middle of the display, please help!

    Hello! I've already searched through the discussions and found some people with similiar display issues. But I just had to post this question because I'm panicing. I turned on my MacBook Pro 1.83 (It's from July '06) today just to notice a white spot

  • Can I include a text file to read from within java?

    I have a config file I need to read within a java program called config.xml. I want to reference this document, but don't now how to without using '..new(File("config.xml"))' and this forces me to put it in a directory somewhere. I just want to refer

  • Crashed during update; what to do now?

    was asked to update to ios6, but now the iphone won't work, not even recognised by pc. what now?

  • Library Gone + Runtime Error

    I am utterly confused, this is the second time iTunes died on me without me even restarting the PC. What happened this time was, I tried to open it but it gives me the following error: Runtime Error! Program: C:\Program Files\iTunes\iTunes.exe R6025