XML validation with DTD

Hi Team,
I want to validate the XML content with DTD refered in the XML. I have problem now is my DTD are present in a jar file. How do I need to set systemid to the input source so that it works.
<!DOCTYPE test SYSTEM "test.dtd">
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(true);
factory.setNamespaceAware(true);
inputSource.setSystemId("path");
SAXParser parser = factory.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setErrorHandler(new XmlValidationErrorHandler());
reader.parse(inputSource);
Regards
Richard

i believe the best way to handle that would be to set the EntityResolver on the XMLReader to your own implementation which loads the DTD from the jar.

Similar Messages

  • XML validation with DTD in java 1.5 not supporting

    Hi,
    I am facing a problem regarding validation of xml file with DTD tag in it.
    I have disabled the parser through setValidating(false) method.
    xml file is not parsed in JRE 1.5.but it is parsed in JRE 1.6.
    Why this is showing such a behavior?
    I have used xerces 2.9.0,xml-api.jar and other jar regarding XML api but still it is giving error.
    please help me.
    please provide a jar file name or its issue resolution in jre 1.5 or 1.4.

    thanks for your prompt reply.
    I required that it should be completely disabled in jre 1.5(jdk1.5 or 1.4).
    I am using DOM Parsing.I have currently disabled with follwowing method,
    builderFactory.setValidating(false);
    builderFactory.setFeature("http://xml.org/sax/features/validation",
         false);
         builderFactory.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false);
         builderFactory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",false);
         builderFactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
         builderFactory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
         factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
    in 1.6 it is working fine but I required that i have to disabled it.but it is giving a error in jre1.5.
    Exception in thread "main" java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
    I just want to disable the parsing in jdk version 1.5 or 1.4
    thanks in advance
    anand

  • XML validation with DTD stored in String object

    Does anyone know if this is plausible......
    I am trying to validate some XML with a DTD... easy enough, right? The catch is that the dtd is NOT stored in a file somewhere and is also not declared in the XML to be validated. It is stored in a String object (as is the XML file to be validated).
    To clarify - I want to do something like this... but not sure how to incorporate the DTD.
    String dtd = // dtd definition here
    String xml = // xml text here (no URI at the top)
    SAXParserFactory factory = SAXParserFactory.newInstance();
    SAXParser parser = factory.newSAXParser();
    DefaultHandler handler = new DefaultHandler();  // DTD handler??
    parser.parse(new InputSource(new StringReader(xml.toString())), handler);any help would be greatly appreciated.
    thanks in advance,
    Terrance

    I guess it makes the most sense to make the dtd local to the xml. Therefore I would only have one string with both the xml contents and dtd contents. That is how I am going to approach this unless I hear something different.

  • XML Validation with DTD... Urgent

    Hi all,
    I am using java 1.4
    I have to validate the XML file with the external DTD.
    Can anyone give me the code for that.
    DTD should be external.
    Thanks,
    Vinayak.

    If you are using Solaris , it has xml validation tool "xmllint", using this you can validate your xml against DTD.
    try with "xmllint --help " to see all the option.
    Message was edited by:
    sasrivas

  • XML Validation with multiple XSD files (referenced)

    Hello,
    I know that XML validation with version 7.1 is possible now. However I was provided with a set of XSD files that have references to each other and need to be placed in a hierachical file system order so that references can be resolved.
    An element <xsl:include schemaLocation="../../baseSchemas/baseSchema.xsd" /> is used for example. How can I handle that for XSD validation in PI? Can I create the same folder structure or do I need to put all XSD files in one directory and change the import manually?
    But most important question: Is it possible it all to use more than one XSD for schema validation?

    Dear Florian,
    I had encountered such case in a project.
    I was given 3 files. One main file and 2 others called Schema1.xsd and Schema2.xsd.
    This happens because your data type is not in single namespace, but is being referred across namespaces and software components.
    I am assuming that you have read the How to Guide for XML validations on PI 7.1
    Best way to do this quickly is as follows.
    1. Enable XML validation at adapter engine in the sender agreement.
    2. Post a message using HTTP post. (http://sappihttpclient.codeplex.com)
    3. Check communication channel in runtime workbench. There will be an error saying which is missing at what path.
    4. Create the path mentioned and place the file at that path.
    5. Repeat steps 2,3,4 for all the files.
    When you are done with this, you will get a proper validation error in case XML file is not correct. And remember to generate XSD from message type and not data type.
    Regards,
    Vikas
    Edited by: Vikas Aggarwal on Sep 2, 2009 8:45 PM
    Edited by: Vikas Aggarwal on Sep 2, 2009 8:48 PM

  • Validating generated XML file with DTD

    Hello all,
    my requirement is to test the XML file with its DTD.
    we are creating an XML file, before writing it on the application server , we need to test it with its DTD.
    i found one method set_validating in the interface if_ixml_parser , for validating XML file, but not getting an idea how to use it, like how to link the DTD to XML etc.
    if i try to use the above method am getting the following error:
    Unable to retrieve the external entity 'd:\dtdfile.dtd'.
    where 'd:\dtdfile.dtd' is the path of the DTD file included in the Doctype of the XML file.
    Please help me to solve this.
    Thx in advance.

    Hello,
    Did you find your answer ?
    I know how to validate an XML file an internal DTD, but not an external one... If you know, can you pelase advice ?
    If you didn't found yet, you need to use method get_reason() to get the description of the error.
    best regards,
    Gilles.

  • XML Validation with External XSD

    Hi
    I have a xml file having DTD declaration, but my requirment is to validate this xml file with External XSD not with DTD which is declared inside the file.
    on executing java code below it is looking for DTD. how to supress validating against dtd.
    SAXParserFactory factory = SAXParserFactory.newInstance();
                   factory.setValidating(false);
                   factory.setNamespaceAware(true);
                   SchemaFactory schemaFactory =
                       SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
                   factory.setSchema(schemaFactory.newSchema(
                       new Source[] {new StreamSource("C:\\vittal\\Project\\received\\development-1\\da_xsd\\daAuthoring.xsd")}));
                   SAXParser parser = factory.newSAXParser();
                   XMLReader reader = parser.getXMLReader();
                   reader.setErrorHandler(new LogErrorHandler());
                   reader.parse(new InputSource("C:\\vittal\\Project\\received\\A-ADD\\DAContentExamples_2\\SampleGuidance_1.xml"));error i am getting is License file saxon-license.lic not found. Running in non-schema-aware mode
    java.io.FileNotFoundException: C:\vittal\Project\received\A-ADD\DAContentExamples_2\daAuthoring.dtd (The system cannot find the file specified)

    Hi
    I have a xml file having DTD declaration, but my requirment is to validate this xml file with External XSD not with DTD which is declared inside the file.
    on executing java code below it is looking for DTD. how to supress validating against dtd.
    SAXParserFactory factory = SAXParserFactory.newInstance();
                   factory.setValidating(false);
                   factory.setNamespaceAware(true);
                   SchemaFactory schemaFactory =
                       SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
                   factory.setSchema(schemaFactory.newSchema(
                       new Source[] {new StreamSource("C:\\vittal\\Project\\received\\development-1\\da_xsd\\daAuthoring.xsd")}));
                   SAXParser parser = factory.newSAXParser();
                   XMLReader reader = parser.getXMLReader();
                   reader.setErrorHandler(new LogErrorHandler());
                   reader.parse(new InputSource("C:\\vittal\\Project\\received\\A-ADD\\DAContentExamples_2\\SampleGuidance_1.xml"));error i am getting is License file saxon-license.lic not found. Running in non-schema-aware mode
    java.io.FileNotFoundException: C:\vittal\Project\received\A-ADD\DAContentExamples_2\daAuthoring.dtd (The system cannot find the file specified)

  • SAXParser inside unsigned Applet: Validation with DTD

    Hello!
    I am trying to run an applet that performs some XML parsing ideally with DTD validation.
    The issue is that I can't access files directly, but using tricks such as Class.getResourceAsStream() which I can do fine for my XML file my XML file. But then this xml has a reference to test.dtd (also in the jar file).
    When the parser runs, it tries to open test.dtd "illegally" and a security exception is thrown. Any advice in how to avoid this?
    BTW, I have already thought of:
    * Traslating the DTD to a Schema
    * Disabling validation
    Would work, but not the solution I'm looking for :)

    It doesn't seem like the SAXParser allows it, but if you use an XMLReader, you can specify an EntityResolver class.
    The EntityResolver is called when SAX wants to open a resource. Your code can supply an InputSource to point to the resource you want.
    Dave Patterson
    Message was edited by:
    d.patterson

  • XML Validation with no connection to the internet

    Hi,
    I'm trying to validate a ml instance document against a xml schema, using the javax.xml.validation.Validator.validate() method. This works fine as long as I have an internet connection, but not when I disconnect from the internet it fails.
    I've detected, using a network sniffer, that this is due to the fact that the validation process tries to fetch the XMLSchema.dtd and datatypes.dtd from w3.org. Is there any way to avoid this by prestoring these somewhere? So that the internet connection is not needed?
    I need to be able to do validation without a connection to the internet since the environment where my application is deployed does not have such a connection.
    Ray

    Hi Ray,
    Were you able to resolve this issue? I am encountering a very similar problem where I am not connected to the internet and it fails during the newSchema method on javax.xml.validation.SchemaFactory. I have attempted to implement the suggestions of ExtremeGardener and vidyut with no luck.
    Per ExtremeGardener's suggestion of replacing xmlns:xs="http://www.w3.org/2001/XMLSchema" with xmlns:xs="XMLSchema.xsd" and storing it locally, it gave me an error for trying to set the "xs" or "xsd" prefixes to anything other than "http://www.w3.org/2001/XMLSchema." I forget the exact error. I also tried to use my own prefix and it did not like that either.
    Per vidyut's suggestion of using a catalog resolver, I believe that I have tried that too (if I understand correctly). I created an LSResourceResolver and tied it to the SchemaFactory. I can invoke it for a namespace but that did not resolve the issue because it only invokes the resolver on an import, include, or redefine. I believe that it is trying to reach the internet due to the xmlns:xs="http://www.w3.org/2001/XMLSchema" attribute within the top-level schema element in the XSD and I know of no way to invoke it for that.
    I also created an ErrorHandler and tied it to the SchemaFactory. That shows me the errors and they are all related to the standard XML data types defined in XMLSchema.xsd. The errors that I am seeing are all of this form: "UndeclaredPrefix: Cannot resolve 'xs:string' as a QName: the prefix 'xs' is not declared."
    I am currently using the SchemaFactory in Java 1.5, but I am thinking about trying the Xerces SchemaFactory since they are not exactly the same implementation.
    Does anyone have any other suggestions? Any help you can provide would be greatly appreciated!
    Thanks,
    betzro1

  • Xerces2_6_2 validating with dtd and schema.. please help

    Hi I am having trouble validating an xml document using xerces2_6_2
    I have a DTD that containes only entity references, and a schema that is used to ensure the xml is valid.
    I get this error.
    Element type "my root tag" must be declared!
    It seems to expect all validation grammer to be in the dtd. I have sucessfully validated with xml spy and oxygen,(oxygen uses xerces too).
    This is a real pain I really would lie to take advantage of using schemas, I know I could just use entity references in this form and not have a dtd but this is really not acceptable.
    I have tried out all the xerces specific properties and features but this has not worked either.
    Perhaps I should implement a validator? Does anyone have any ideas?
    thanks

    My solution, I thought to take, wasn't the right way, but I have found following thread within the forum
    http://forum.java.sun.com/thread.jspa?forumID=34&threadID=527461
    The problem you have described points to a dtd error. Considering the thread above, it would make sense. It is a presumption, but perhaps that is because of the new Xerces version. I would try with an older one.
    Sorry, that I could help you along.

  • Validation with DTD: Bug in Oracle 10g?

    Hi
    The following example works with Oracle 11g, but not with Oracle 10g.
    I have a XML-document (familie.xml) and a DTD-Document (familie.dtd). The XML-document is not valide, because I changed the tag "Vater" into "Dad". Within
    the DTD the "Vater"-element is described as follow: <!ELEMENT Familie (Vater, Mutter, Kind) >. If I validate the document, I get in Oracle 11g this exception:
    Unexpected Error: ORA-31011: XML-Parsing not succesful
    LPX-00104: Warning: Element "Dad" is not declared in the DTD.
    Error at line 3 occured.
    This Error is right!! But if I try the SAME example in Oracle 10g, I don't get a Exception!!!! But I should become one.
    Have anyone tested DTD-Validation in Oracle 10g or is it a bug?
    <?xml version='1.0' encoding='ISO-8859-15' ?>
    <!-- Dokument beschreibt eine Familie -->
    <Familie>
         <Dad>
              <Name>Meier</Name>
    <Vorname>David</Vorname>
         </Dad>
         <Mutter>
              <Name>Baumann</Name>
              <Vorname>Charlotte</Vorname>
         </Mutter>
         <Kind>
              <Name>Slota</Name>
              <Vorname>Kaharina</Vorname>
         </Kind>
    </Familie>
    <!ELEMENT Familie (Vater, Mutter, Kind) >
    <!ELEMENT Vater (Name, Vorname)>
    <!ELEMENT Mutter (Name, Vorname)>
    <!ELEMENT Kind (Name, Vorname) >
    <!ELEMENT Name (#PCDATA) >
    <!ELEMENT Vorname (#PCDATA) >
    set directory TEST_DIR as '....';
    DECLARE
    v_parser xmlparser.parser;
    v_document xmldom.DOMDocument;
    v_nodeList xmldom.DOMNodeList;
    v_number NUMBER;
    v_xmlDatei VARCHAR2(32);
    v_dtdDatei varchar2(32);
    parserError EXCEPTION;
    PRAGMA EXCEPTION_INIT(parserError, -20100);
    BEGIN
    v_xmlDatei := 'familie.xml';
    v_dtdDatei := 'familie.dtd';
    v_parser := xmlparser.newParser();
    DBMS_XMLPARSER.setBaseDir(v_parser, 'TEST_DIR');
    xmlparser.setValidationMode(v_parser, TRUE);
    xmlparser.parseDTD(v_parser, v_dtdDatei, 'Familie');
    xmlparser.parse(v_parser, v_xmlDatei);
    v_document:=xmlparser.getDocument(v_parser);
    xmlparser.freeParser(v_parser);
    xmldom.freeDocument(v_document);
    EXCEPTION
    WHEN parserError THEN
    xmlparser.freeParser(v_parser);
    dbms_output.put_line('Fehler beim Parsen: ' || SQLERRM);
    WHEN OTHERS THEN
    dbms_output.put_line('Unerwarteter Fehler: ' || ' ' || SQLERRM);
    END;
    null
    Message was edited by:
    user638576

    Do your sequence and column have the same name? In your code sample, it looks like they do:
    INSERT INTO LSTKPI (KPIIDD, PRMNME, KPISUP, TEMIDD1)
    VALUES (KPIIDD.NEXTVAL, NEXTPRM.PRMNME, NEXTSTA.STANAM, PDRTEM_PKG_1.rids(i));
    Maybe that has confused the parser.
    As Oracle moves forward, you can expect more object-oriented functionality. That could mean that columns could have their own attributes or methods. If so, how is the parser to know whether in this code the value KPIIDD.NEXTVAL refers to the (external) sequence or a column attribute?
    As a suggestion, try renaming the sequence.
    create sequence KPIIDD_SEQ start with ... ;
    INSERT INTO LSTKPI (KPIIDD, PRMNME, KPISUP, TEMIDD1)
    VALUES (KPIIDD_SEQ.NEXTVAL, NEXTPRM.PRMNME, NEXTSTA.STANAM, PDRTEM_PKG_1.rids(i));
    HTH,
    - Doug

  • XML validation with JDOM / JAXP

    Hello,
    I am trying to validate xml file against schema file. I decided to use JDOM and JAXP.
    First question: is it a good choice?
    I did a first attempt but not sure I have understood all what I am doing :(
    First I have create a parser usinf org.jdom.*
    SAXBuilder parser = new SAXBuilderThen I built my document:
    Document doc = parser.build(myFile)These 2 steps are ok. But it does not do validation.
    I saw in the JDOM documentation that I can set a validation flag to true. I did it. First problem, I got the following error from JDOMException: Document is invalid: no grammar found.
    Is there a way to specify to the parser where to find the xsd file?
    As I did not find answer to this question by myself, I tried implementing the Schema class from JAXP:
    SAXBuilder parser = new SAXBuilder;
    Document doc = parser.build(myFile);
    Schema schema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaFile);
    ValidatorHandler vh = schema.newValidatorHandler();
    SAXOutputter so = new SAXOutputter(vh);
    so.output(doc);It does the validation against the schema file specified but I am not really sure about what I am doing here. The last 2 commands are not clear to me :(
    Then in my schema file, I have elements that have default value. I expected the following behavior: if the element is not in the xml file then the default will be used by the parser (and added in the tree). But it seems, it's not the case.
    Any help/explanation will be really appreciated.

    I am trying to validate xml file against schema file. I decided to use JDOM and JAXP.
    First question: is it a good choice?
    If only schema validation is required use the validation API in JDK 5.0.
    http://www-128.ibm.com/developerworks/xml/library/x-javaxmlvalidapi.html
    http://java.sun.com/developer/technicalArticles/xml/validationxpath/
    For validation with JDOM, the following validation application explains the procedure:import org.jdom.input.SAXBuilder;
    import org.xml.sax.SAXException;import org.jdom.*;
    import java.io.*;
    public class JDOMValidator{
    public void validateSchema(String SchemaUrl, String XmlDocumentUrl){
               try{
    SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser",true);<br/>saxBuilder.setValidation(true);
    saxBuilder.setFeature("http://apache.org/xml/features/validation/schema",true);
    saxBuilder.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);
    saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",SchemaUrl);
    Validator handler=new Validator();
    saxBuilder.setErrorHandler(handler);
    saxBuilder.build(XmlDocumentUrl);
    if(handler.validationError==true)
    System.out.println("XML Document has Error:"+handler.validationError+""+
    handler.saxParseException.getMessage());      
    else           
          System.out.println("XML Document is valid");
              }catch(JDOMException jde){
                }catch(IOException ioe){
    private class Validator extends DefaultHandler{     
         public boolean  validationError = false; 
         public SAXParseException saxParseException=null;    
      public void error(SAXParseException exception) throws SAXException{        
         validationError =true;
         saxParseException=exception; 
      public void fatalError(SAXParseException exception) throws SAXException  {
    validationError = true;     
    saxParseException=exception;
      public void warning(SAXParseException exception) throws SAXException       {
    public static void main(String[] argv)   {
       String SchemaUrl=argv[0];StringXmlDocumentUrl=argv[1];
       JDOMValidator validator=new JDOMValidator();
       validator.validateSchema(SchemaUrl,XmlDocumentUrl);
    }

  • XML Validation with Java

    I have created a XML file with dom4j and the file confirmed to be valid when I read the file with Internet Explorer, a online XML validator and a free XML editor called "CookTop". However, when I attemp to read the XML file during the execution of an ant task I always get the XML parsing exception that one of my tag is not closed. I have even wrapped that test inside the tag as CDATA but that does not help as well. Do any one know what's happening? Here's my environment:
    JDK: 1.4.2_05
    Xerces: 2.6.2
    Ant: 1.5.3
    Thanks so much in advance.
    I've been pumping my head into the wall for hours : p

    Can i know where to download the CookTop?or CookTop2?

  • XML validation with StAX

    Hi,
    I have a requirement to validate XMLs during JAXB unmarshalling and during StAX parsing. The schema is packaged in a jar. I am able to successfully read the schema, and validate the XML during unmarshalling by setting the schema in the unmarshaller (through setSchema()).
    However, I am not able to validate it with StAX using the same schema and same XML.
    Here is the code snippet for StAX:
    StringReader stringReader = new StringReader(inputXMLStr);
    XMLEventReader xmlEventReader = XMLInputFactory.newInstance().createXMLEventReader(stringReader);
    EventFilter filter = new EventFilter() {
    public boolean accept(XMLEvent event) {
    return event.isStartElement();
    XMLEventReader xmlFilteredEventReader = xmlif.createFilteredReader(xmlEventReader, filter);
    Schema mySchema = getSchema(); // this method retrieves the schema by reading the schema files as
    stream source and calling schemaFactory.newSchema(...)
    Validator validator = mySchema.newValidator();
    validator.setErrorHandler(new SchemaErrorHandler());
    Source xmlSource = new StAXSource(xmlFilteredEventReader);
    validator.validate(xmlSource);
    I get a SAX Parse exception saying "cvc-elt.1: Cannot find the declaration of element 'myElement'"
    And I also see the following exception:
    Caused by: java.lang.NullPointerException
         at com.sun.org.apache.xalan.internal.xsltc.trax.StAXEvent2SAX.bridge(StAXEvent2SAX.java:171)
         at com.sun.org.apache.xalan.internal.xsltc.trax.StAXEvent2SAX.parse(StAXEvent2SAX.java:118)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:651)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
         at com.sun.org.apache.xerces.internal.jaxp.validation.StAXValidatorHelper.validate(StAXValidatorHelper.java:89)
         at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:114)
         at javax.xml.validation.Validator.validate(Validator.java:127)
    I am not able to figure out why the validation would work with UnMarshaller but not with StAX.
    Any help appreciated.
    Thanks
    Meera

    Have u tried the Stream STAX parser instead?
    something like:
    SchemaFactory factory = SchemaFactory
                             .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    File schemaLocation = new File(XSD_FILE_PATH);
                   Schema schema = factory.newSchema(schemaLocation);
    // 3. Get a validator from the schema.
    Validator validator = schema.newValidator();
    ErrorHandler lenient = new ForgivingErrorHandler(fw);
    validator.setErrorHandler(lenient);
    XMLInputFactory staxFactory = XMLInputFactory.newInstance();
    staxFactory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES,
                             Boolean.TRUE);
    staxFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES,
                             Boolean.FALSE);
    staxFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE,
                             Boolean.TRUE);
    staxFactory     .setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
    FileInputStream fis = new FileInputStream(XML_FILE_PATH);
    XMLStreamReader xmlr = staxFactory.createXMLStreamReader(fis);
    validator.validate(new StAXSource(xmlr));

  • To read XML file with DTD in SSIS

    Hi,
    My SISS package needs to read .mak file and store it in a sql tables.
    I am receiving xml file content in mak file extension with DTD. So I couldn't read through XML source shows error DTD is prohibited in this document. After removing DTD by manually, the xml file has multiple outputs.
    Please guide me how to remove DTD by coding and also I don't have xsd and xsl file for this only mak file.
    Thanks.

    Thanks Visakh for your answer.
    I have tried in XML task which described in the thread. But I couldn't remove DTD file, I am getting following error,
    [XML Task] Error: An error occurred with the following error message: "Could not find a part of the path 'C:\Program Files (x86)\FAST\Builder\bin\makefile.dtd'.".
    As I said before I am receiving in .mak file extension. The beginning of file content is like below,
    <?xml version='1.0'?>
    <!DOCTYPE makefile SYSTEM "file:///C:/ProgramFiles
    (x86)/FAST/Builder/bin/makefile.dtd"[
    <!ENTITY % default-content-type "'text/html'">
    <!ENTITY prjdir "G:\cdrom\Employees_2014_02">
    <!ENTITY imgdir "G:\images\forms\gifs">
    <!ENTITY foddir "G:\SOFT\FORMS CD\Feb14">
    <!ENTITY ccdir "Y:\Content">
    ]>
    <makefile>
    &fsysdse;
    <content-collection id="b1" title="Employers and Employees" filename="&ccdir;\Employees_2014_02.nfo" password=""> ....
    After replace all variable (prjdir,imgdir,fodder,ccdir) into values specified in the entity tag, I removed above underlined part - so the xml file is ready without DTD part and able to use in
    XML source. I have received 6 outputs from XML source.
    My question is how to do this manual work in SSIS? It’s not only one file, so many files needs to updated SQL tables automatically so everything should be done by coding.
    Please guide me in which way I can achieve this?
    If you want to do this in SSIS
    one way is to use Script Task to parse the file and remove the DTD part.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • IWeb 1.1.1. Sites Won't Open in iWeb 3.0.1

    Can't seem to find an answer in this Forum to my problem. After transferring my Domains.sites file from iWeb 1.1.1 (Library/App Support) from my OS 10.4.11 Mac Mini to my Leopard Mini (10.5.8) iWeb 3.0.1 App Support location only the Domains.Sites2 f

  • Link db results to Dropdown list and link to email

    I need to pull information from a table 'Suppliers' in an (datebase.mdb) and retrieve two items, name and email. This in itself Dreamweaver makes fairly simple. From this information I need to produce a dropdown list, again Dreamweaver makes this sim

  • Nokia 2330 Classic - turning off startup tone

    I would like to disable the startup tone on the 2330 classic. User manual doesn't seem to have anything on this. Gad of any help.

  • BufferedImage - byte[] ??

    I want to send an Image from my applet to my servlet via an HTTP connection. I want to do the encoding of the image to gif/jpeg on the server side and not in the applet, therefor I have to transfer the Image object via http as binary data. Because th

  • Delete data service in Data/Services panel

    Hi, I can´t delete or refresh data service in Data/Services panel. Help!!