Ignore DOCTYPE tag in XML Validation

All,
I am trying to read an XML file using a file adapter with passing using the XSD created out of that XML. In normal scenario it works fines. Problems comes when I cam trying to read the XML file which had the Tag <!DOCTYPE> as shown below on top of the root node.
In this case XML parsing is failing and file adapter is throwing the error.
Any pointers on this.
Many Thanks.
Regards,
Ramana.
Sample XML (For Example):
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE CFXML [
<!ELEMENT CFXML (thisDocumentGenerationDateTime,thisDocumentIdentifier,CFData)>
<!ELEMENT thisDocumentGenerationDateTime (DateTimeStamp)>
<!ELEMENT thisDocumentIdentifier (ProprietaryDocumentIdentifier)>
<!ELEMENT CFData (ProprietaryInformation*,ProductLineItem+,CFReportBLOB?)>
<!ELEMENT DateTimeStamp (#PCDATA)>
<!ELEMENT ProprietaryDocumentIdentifier (#PCDATA)>
<!ELEMENT ProprietaryInformation (Name,Value)>
<!ELEMENT ProductLineItem ( ProductLineNumber , TransactionType , CPUSIUvalue , ConfigurationControlNumber?, ProprietaryGroupIdentifier , ServicePacLineNumberReference? , Quantity , ProductIdentification , UnitListPrice? , MaintenanceUnitListPrice? , ProductSubLineItem* ) >
<!ELEMENT CFReportBLOB (#PCDATA)>
<!ELEMENT Name (#PCDATA)>
<!ELEMENT Value (#PCDATA)>
<!ELEMENT CPUSIUvalue (#PCDATA)>
<!ELEMENT ConfigurationControlNumber (#PCDATA)>
<!ELEMENT ProductLineNumber (#PCDATA)>
<!ELEMENT ProprietaryGroupIdentifier (#PCDATA)>
<!ELEMENT ServicePacLineNumberReference (#PCDATA)>
<!ELEMENT Quantity (#PCDATA)>
<!ELEMENT TransactionType (#PCDATA)>
<!ELEMENT ProductIdentification (PartnerProductIdentification*) >
<!ELEMENT ProductSubLineItem ( LineNumber, TransactionType, Quantity , ExchangeAddSubLineItemNumber? , ProductIdentification, UnitListPrice?,MaintenanceUnitListPrice?)>
<!ELEMENT UnitListPrice ( FinancialAmount, PriceTerm)>
<!ELEMENT MaintenanceUnitListPrice (FinancialAmount, PriceTerm)>
<!ELEMENT PartnerProductIdentification ( OrderedProductIdentifier?, ProprietaryProductIdentifier, ProductDescription?, ProductTypeCode?, ProductIdentifierTypeCode?) >
<!ELEMENT LineNumber (#PCDATA)>
<!ELEMENT ExchangeAddSubLineItemNumber (#PCDATA)>
<!ELEMENT FinancialAmount ( GlobalCurrencyCode, MonetaryAmount )>
<!ELEMENT PriceTerm (#PCDATA)>
<!ELEMENT OrderedProductIdentifier (#PCDATA)>
<!ELEMENT ProprietaryProductIdentifier (#PCDATA)>
<!ELEMENT ProductDescription (#PCDATA)>
<!ELEMENT ProductTypeCode (#PCDATA)>
<!ELEMENT ProductIdentifierTypeCode (#PCDATA)>
<!ELEMENT GlobalCurrencyCode (#PCDATA)>
<!ELEMENT MonetaryAmount (#PCDATA)>
]>
<CFXML>
<thisDocumentGenerationDateTime>
<DateTimeStamp>2008-05-23T14:02:49.465-05.00</DateTimeStamp>
</thisDocumentGenerationDateTime>
</CFXML>

Guys,
There is a small tricky point here. The above operation works in the simple file adapter but dosn't work for Chunk read file adapter.
The InteractionSpec (oracle.tip.adapter.file.outbound.ChunkedInteractionSpec) of the Chunk read file adapter dosn't support this functionality. I guess we have raise an SR, if I am correct.
-Ramana.

Similar Messages

  • Ignore DOCTYPE tag in xml

    Hi!,
    I need to remove DOCTYPE tag from the xml file. The parser is trying to validate the DTD. I do not want to validate, I just want to parse. I could not find any documentation on how this can be done. if any one of you have done this please let me know how you have managed to ignore the DOCTYPE tag.
    Regards

    Here is one way to do it:
    Example taglib DOCTYPE:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    Example Code:
    // Get your parser, then set its EntityResolver to your own custom er.
    parser.setEntityResolver(new EntityResolver()
    public InputSource resolveEntity(String publicId, String systemId)
    if ("-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN".equals(publicId))
    return new InputSource(
    new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
    else
    return null;
    });

  • How to ignore DOCTYPE when parsing xml java?

    Hello
    i am trying to parse some sml files that have:
    <!DOCTYPE ModuleRoot SYSTEM "C:\xxx\xmlapp.dtd">
    i don;t have the dtd file
    how can i ignore it by changing my code and not changing the xml file.
    DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
    this.doc = documentBuilder.parse(xmlFileName);
    i got exception in this.doc = documentBuilder.parse(xmlFileName);
    (The system cannot find the path specified)
    Thanks in advance.

    You need to create an EntityResolver that returns a dummy DTD. Since you aren't actually validating, this can be as simple as:
            db.setEntityResolver(new EntityResolver()
                public InputSource resolveEntity(String publicId, String systemId)
                    throws SAXException, IOException
                    return new InputSource(new StringReader(""));
            });For more information, here's an article that I wrote on [XML parsing and validation|http://www.kdgregory.com/index.php?page=xml.parsing].

  • XML Validation: ignore non-XML-Header in XML-file(payload): any solutions?

    Dear Experts,
    after I finally managed to configure the XML Validation, we're facing the next problem:
    The payload of the XML files looks like that:
    Abcdef#ABCDEF
    AbcDef#123
    <?xml version="1.0" encoding="UTF-8"?><Document xmlns.....
    as you can see, there's a header which is necessary. The XML Validation works fine if the header is removed manually for testing. If the header is not removed, the validation is not possible ("Content is not allowed in prolog.")
    Is it possible to realise the validation WITH that header? Can I tell SAP PI to ignore the header? Or make any changes to the XSD file?
    Thanks alot!

    Hi Armin,
    Armin Kern wrote:
    > After leaving SAP PI, those 2 lines have to be in that exact place (before the XML part) for further processing. Just deleting it wouldn't be enought. Does the complex design you mentioned complay with this requirement?
    You can put it into the message instead of deleting. And rebuild the "header" in the second step. So you can fullfill the requirement. As mentioned before: The design is complex, this will lead later on to problems. Any change will be difficult, as another developer had to read a long documentation.
    An alternative would be to do all with one interface mapping (without validation):
    1. ABAP / Java mapping deleting the "header" (put it to memory)
    2. Messges Mapping 1:1 each field (will fail in case of wrong format and act as validator)
    3. ABAP / Java mapping restoring the header
    4. Alert will be raised in case of an error (to get the result of the validation)
    Armin Kern wrote:
    > I also thought about splitting the message, deleting those 2 rows in one of the messages, sending this one message to PI again, validate it and if it is correct, send the second message (without mapping) to the final destination. No idea if that is possible at all..
    As well possible. You would need a virtual receiver for the first message, which is sending back a response. For example a servlett, a proxy or a RFC module. In that design you put some logic to the sender, what is actually not bad. But if you do so, why you dont validate there as well (for example with Java)? It would make your design much easier..
    Regards,
    Udo

  • DOCTYPE tag above CF's form validation javascript

    Hi,
    CF 8 seems to put the form validation javascript at the very top of the page, even before the HTML tag and the DOCTYPE validation tag.  This is causing problems with my style sheet.  Do you know of a way I can (at the very least), put my DOCTYPE tag above the javscript that CF renders?
    Thank you,
    David
    <script type="text/javascript" src="/CFIDE/scripts/cfform.js"></script>
    <script type="text/javascript" src="/CFIDE/scripts/masks.js"></script>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    Include the head tag, to entice Coldfusion to put the script tags there. Something like this
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><title>test page</title></head>
    <body >
    <cfform>
    </cfform>
    </body>
    </html>

  • Validating XML with external dtd without doctype specified in xml

    Hi,
    I am very new to SAX, DOM and things..but I am really pulling my hair to find the soln., I have tried to search soln but I found many people asking same question but hardly anyone was satisfactory.
    My problem is that I have xml file without doctype specified in it, but I have dtd available on my system.
    I have tried to set MyEntityResolver which implements EntityResolver in documentBuilder but its only getting called (resolveEntity method of MyEntirtyResolver), only when I add doctype to the xml (which is not what I want) and not when there is no doctype in the xml. I have set "factory.setValidating(true)" and I also have errorHandler in place.
    But why EntityResolver is not invoked when its needed most. ie. when doctype is not available in xml ?...it complains that DOCTYPE must match root=null , which is obvious because no DOCTYPE in xml.
    code is as follows:
    please help me ..if anyone has any idea about this ....
    Main class is :
    public static void main(String args[]){
              Document document=null;
              ErrorHandler defaultHandler=new MyDefaultHandler();
              String xmlFile="note.xml";
              try{
                   System.out.println("Starting...");
                 boolean validXML = true;
                 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                 factory.setNamespaceAware(true);
                 factory.setValidating(true);
                 try {
                    ExternalResolver er = new ExternalResolver();
    // addURL is just a method which sets string in a map to be retrieved by resolveEntiy
                    er.addURL("D:\\SAXnDOM\\SAXProject\\note.dtd");
                    DocumentBuilder builder = factory.newDocumentBuilder();
                     builder.setEntityResolver(er);
                     builder.setErrorHandler(new MyDefaultHandler());
                    builder.parse(new File(xmlFile));
                 resolveEntity of ExternalResolver is as follows:
    public InputSource resolveEntity(String publicId, String systemId)
                   throws SAXException, IOException {
               System.out.println("********resolvedEntity:" +publicId +" and "+systemId +"******");
             if ( urlMap != null && urlMap.get(systemId)!= null ){
                 try {
                     return new InputSource(new FileReader(systemId));
                 } catch (FileNotFoundException e) {
                     System.out.println("[ERROR] Unable to load entity reference: " + systemId );
             return null;
    public void addURL(String filePath) throws MalformedURLException{
              addURL(new File(filePath).toURL());
         public void addURL(URL url) {
             if ( urlMap == null ){
                 urlMap = new HashMap();
             urlMap.put(url, null);
         }

    Its working.... its working ...
    problem was in resolveEntity, that stupid if condition was removed like this:
    public InputSource resolveEntity(String publicId, String systemId)
                   throws SAXException, IOException {
               System.out.println("********resolvedEntity:" +publicId +" and "+systemId +"******");
                try {
                     return new InputSource("D:\\SAXnDOM\\SAXProject\\note.dtd");
                 } catch (Exception e) {
                     System.out.println("[ERROR] Unable to load entity reference: " + systemId );
             return null;
         }Other change is (which I didnt like ) is that in my xml, I had written fake doctype like :
    <?xml version="1.0"?>
    <!DOCTYPE note SYSTEM "fakenote.dtd">
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    <Prashant>prdfjfdj</Prashant>
    </note> in above code fakenote.dtd doesnt exist anywhere ..its just to bypass that doctype:null error.
    So my guess is that EntityResolver overrides doctype in the xml and applies its own doctype (note.dtd in this case)
    But new proble comes...what if i dont want to add any doctype ..not even fake in xml ?
    Hope my stupid mistakes will find someone usefull..

  • XML validation error while parsing MXI Manifest

    Hi,
    I have created an hybrid extension for Photoshop. I want to upload my extension on Adobe Exchange. during the upload process I get an error,
    "XML validation error while parsing MXI Manifest: Declarations can only occur in the doctype declaration. Line: 19 Position: 791 Last 80 unconsumed characters".
    The error description specifies that description in MXI file is not valid. Below are the contents of my MXI file.
    <macromedia-extension
               name="yyy"
               id="com.yyy"
               version="1.0.0"
               type="object"
               requires-restart="true">
              <author name="abcd" />
              <products>
              <product familyname="Photoshop" maxversion="" primary="true" version="12.0"/>  
              </products>
    <description>
              <![CDATA[
    <p><font size="14" color="black"><b>abcd</b> qwertyuioipafgjhkjljljklkjl
    <br><br>
    Open Extension via: Photoshop top menu > Window > Extensions > abcd.
    <br><br>
    Online support at: <a href="http://www.abcd.com/help.php">http://www.abcd.com/help.php</a></font></p>
    <br>]]>
    </description>
    <ui-access>
              </ui-access>
    <license-agreement>
    </license-agreement>
    <files>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.html" products="" source="zxp-support/Description/abcd.html"/>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.png" products="" source="zxp-support/Description/abcd.png"/>
                <file destination="" file-type="CSXS" products="" source="abcd.zxp"/> 
                <file destination="$automate" file-type="plugin" platform="mac" products="Photoshop" source="mac/abcd.plugin"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop32" source="win32/abcd.8li"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop64" source="win64/abcd.8li"/>
    </files>
    </macromedia-extension>
    Can anyone please point out why am I getting the error?
    Thanks

    Hi CarlSun,
    Thanks for the reply. I have made the changes suggested by you.
    I have few queries:
    1.  Can we use attribute "source" in the description tag?
         I have created a local html page and specified it in source attribute. but the Extension Manager CS6 did not render the local html page and displayed      the following:
         No description avaliable. Click the following link for more details.
         "http://www.abcd.html". Is it possible to display a local html page in Extension Manager CS6?
    2. Can I display an image (png) in CDATA under description tag? If yes, then can you please guide me how can I do so?
    3. As suggested in tech notes MXI file must include UTF-8 encoding as header (<?xml version="1.0" encoding="UTF-8"?>). The MXI I am using does      not have this header. Do I need to include the header?
    Thanks

  • How to disable xml validation

    I'm trying to write an SVG parser using Xerces. The problem is that when the SVG file contains the doctype tag <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">my program throws the following exception:
    java.net.UnknownHostException: www.w3.org
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
            at java.net.Socket.connect(Socket.java:507)
            at java.net.Socket.connect(Socket.java:457)
    etc.If I remove <!DOCTYPE> tag, it works fine. According to what I read here, it's necessary to disable XML validation. The Xerces API documentation says that there is a method setValidation() in org.apache.xerces.framework.XMLParser but I can't locate it. Moreover, I don't see any org.apache.xerces.framework package in Xerces supplied with NetBeans 5.0 nor in Xerces 2.8.0 downloaded from apache.org (the XMLParser class available to me is located in org.apache.xerces.parsers).
    My question is simple:
    How to disable XML validation if the setValidation() method is not avaliable
    OR
    how to make the setValidation method available to my program?
    I'm really confused :(
    Here is the code:
    package svgviewer;
    import java.io.File;
    import org.w3c.dom.*;
    import org.w3c.dom.traversal.*;
    import org.apache.xerces.parsers.*;
    public class SVGFileParser {
        public void parse(String filename) throws Exception {
            File file = new File(filename);
            DOMParser parser = new DOMParser();
            parser.parse(file.toURL().toString()); //exception is thrown if doctype tag is present in the svg file

    You're solving the wrong problem here. Turning off validation won't help, because DTDs don't only do validation. Even non-validating parsers have to read the DTD in case it contains entity definitions, for example.
    If you want to stop the parser from looking for the DTD then you write a EntityResolver and apply it to the parser. The EntityResolver should be just like the one in the example in the API docs except it should return new InputSource(new StringReader("")).

  • XML Validation

    Since there is no XML validation currently in the Flex/Flash framework, I've decided to start a class that parses a string in an effort to validate the markup, returning whether the XML is valid. I have a need for it in my non-server based application, and have read in numerous places where there is desire for it as well. I have built the class far enough to get the ball rollin', but figure it should be :
    A) available to the community
    B) able to be improved upon by the community
    If you improve upon the code, please post your work here so everyone can benefit.
    Here is the source code :
    XML Validator : v0.2 - last edit by Justin Myers | J2 CREATIVE MEDIA DESIGN
    NOTES:
    Parser is a bit weak and needs work.
    Still need to :
    - Make sure tags are ended properly
    - Make sure there is space between tag name and attribute
    Parser currently handles :
    - Making sure there is no space between tags (with exception to white space)
    - Making sure that attributes open and close properly
    - Making sure there is proper space after an attribute or that it is immediately followed with the tag closing
    package community.classes.parsers
           public class XMLValidator
                  public function XMLValidator()
                  public static function validate(str:String , ignoreWhiteSpace:Boolean = true):Boolean
                          // validation defaults to true (innocent til proven guilty)
                          var valid:Boolean = true;
                          // minimum char length to be valid XML
                          if (str.length < 4)
                                 valid = false;
                          var withinTag:Boolean;
                          var withinAttribute:Boolean;
                          var tags:Array = [];
                          var tag:String;
                          for (var i:uint = 0 ; i < str.length ; i++)
                                 var char:String = str.charAt(i);
                                 // if we are closing a tag
                                 if (char == ">")
                                        // invalid if we never opened a tag, or if we never closed the last attribute
                                        if (!withinTag || withinAttribute)
                                               valid = false;
                                               break;
                                        else
                                               withinTag = false;
                                               tags.push(tag);
                                 // invalid if last character is not a closing tag
                                 else if (i == str.length - 1)
                                        valid = false;
                                        break;
                                        // if we are entering a tag
                                 else if (char == "<")
                                        // invalid if we haven't closed the last tag
                                        if (withinTag)
                                               valid = false;
                                               break;
                                        else
                                               withinTag = true;
                                               tag = "";
                                        // all other characters
                                 else
                                        if ((char != " " || char != "\n") || ((char == " " || char == "\n") && !ignoreWhiteSpace) )
                                               // invalid if there are any characters between tags
                                               if (!withinTag)
                                                      valid = false;
                                                      break;
                                               else
                                                      if (char == "\"")
                                                              // entering attribute
                                                              if (!withinAttribute)
                                                                     // invalid if = does not preclude ", or there is space before =
                                                                     if (str.charAt(i-1) != "=" || str.charAt(i-2) == " ")
                                                                            valid = false;
                                                                            break;
                                                                     else
                                                                            withinAttribute = true;
                                                                     // exiting attribute
                                                      

    961190 wrote:
    so whats the best way to store Rules?
    How to get the data validated with those rules given the source data is in a xml file
    The "integrity rules"?
    Since they have to be ececutable code I'd suggest Java classes...
    How to get the data validated with those rules given the source data is in a xml file
    as @hsc71 wrote, that each XML element select the rules this particular element should pass and run each rule with the current element as parameter.
    This meight be easiser in the Rules have a common interface like
    interface Rule{
      public boolean isPassedBy(XmlElement theCurrentElement, XmlElement theRootElement);
    You could use the ServiceRegistry class from the JVM to fetch the known rules, so that you can add new ones with minimum effort.
    bye
    TPD

  • Java mapping for Remove and Add of  DOCTYPE Tag

    HI All,
    i have one issue while the Java mapping for Remove and Add of  DOCTYPE Tag   in Operation Mapping .
    it says that , while am testing in Configuration Test "  Problem while determining receivers using interface mapping: Error while determining root tag of XML"
    Receiver Determination...
    error in SXMB MOni
    " SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">CX_RD_PLSRV</SAP:Code>
      <SAP:P1>Problem while determining receivers using interface mapping: Error while determining root tag of XML: '<!--' or '<![CDATA[' expected</SAP:P1>
    plz provide solutions
    Thanks in advance.

    Hi Mahesh,
    I understand, you are using extended Receiver Determination using Operational Mapping (which has Java Mapping). And, there is an error message u201CError while determining root tag of XMLu201D, when you are doing configuration test.
    Can you please test, the Operational Mapping (which has Java Mapping) separately in ESR, with payload which is coming now. It should produce a XML something like this [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce53aea0d7154ee10000000a421937/frameset.htm]
    <Receivers>
    <Receiver>
      <Party agency="016" scheme="DUNS">123456789</Party>
      <Service>MyService</Service>
    </Receiver>
    <Receiver>
      <Party agency="http://sap.com/xi/XI" scheme="XIParty"></Party>
      <Service>ABC_200</Service>
    </Receiver>
    </Receivers>
    If it is not (I Think it will not), then there is some problem in Java Mapping coding. Please correct it. Last option, if your Java code is small in length; you may paste it here, so that we can have a look at the cause of issue.
    Regards,
    Raghu_Vamsee

  • How to make the tags in XML file case insensitive

    Hi,
    I have a ReadXML class which reads an xml file. This class also has a method which receives a string-child from another class and uses this string-chile to match it with the child tag in the xml file, and returns the child tag's value.
    Now, my problem is this, the child tag in xml may be in a case different from the case of the string-child received from another class.
    How do I modify it, so the program does not return a null pointer exception because the strings did not match for want of uppercase or lowercase letters.
    Thanks
    Sangeetha

    I'm not sure what you are getting at. Is a string child the contents of a node treated as text?
    If you are trying to match a child node regardless of case I doubt this is possible as the XML standard says an XML document is case sensitive so if your parser ignored case it would not be XML complient.
    Hope this helps.

  • JAXP seems to be stripping off DOCTYPE tag

    When I parse a document, the DOCTYPE tag is getting stripped off.
    To parse, I read the document from file and it looks like :
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j">
    After parsing, I dump it to the console and it looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <log4j:configuration debug="null" threshold="null" xmlns:log4j="http://jakarta.apache.org/log4j">
    The mystery the output has two attributes set to defaults, the only the parser knows this is by reading the dtd. But why does not include the DOCTYPE tag?
    The parsing code snippet is:
    Document doc = null;
    DocumentBuilderFactory dbFactory = null;
    dbFactory = DocumentBuilderFactory.newInstance();
    dbFactory.setNamespaceAware(true);
    DocumentBuilder db = dbFactory.newDocumentBuilder();
    db.setEntityResolver(new LogDTDResolver());
    doc = db.parse(is);  // is is an InputStreamAnyone have a clue? Is there a property I am missing. I have searched for the complete set of jaxp properties, but I can't find one.
    Thanks for any help.

    So it looks like log4j is doing its own parsing and it requires the DTD. Don't know how (or why) it does that.
    You call the setOutputProperty() method of the Transformer. This is designed to configure the Transformer with properties that are normally set in the <xsl:output> element of an XSL transformation. The properties you need are "doctype-system" and maybe "doctype-public".
    You're quite right, it isn't obvious. That's what happens when systems are designed by architects who believe in abstraction too much.

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

  • Generating !DOCTYPE tag for a Document

    I am using the SDK JAXP implementation of DOM to parse a simple XML document containing a !DOCTYPE tag, make a minor modification and write it back to a file. All works fine except that the !DOCTYPE tag is not written to the StreamResult by the Transformer.
    getDoctype() on the Document does return a Doctype object that was parsed, but it's not written when transforming the Document into a StreamResult.
    How do I write the !DOCTYPE tag into the output?
    Please help.
    Nikhil

    Set DOCTYPE_SYSTEM output property.
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer();
    transformer.setOutputProperty(javax.xml.transform.OutputKeys.DOCTYPE_SYSTEM, "exampleDtd.dtd");

  • Want PI to ignore Cdata tags....

    Hi folks,
    Just need your inputs,
    Can PI ignore Cdata tags in Messages?

    Hi,
    Please have a look at the following links and see if it helps you.
    CDATA tag in xml
    Handling special characters in an IDOC to XML interface using BC
    Best Regards

Maybe you are looking for

  • Using godaddy to host my iweb (2.0.4) website

    After talking to godaddy, they convinced me that I should have my site hosted by them, Sounded good. They said iweb would work fine. Well, it does not work. I upload the files I created in iweb three times. The first page shows up fine, but the links

  • Dual Executable​s appear

    I have captured the TestStand 3.5 OI LabVIEW files in a LabVIEW 8.20 project file.  I've customized the OI a bit, and I use the Build Specifications area to build an executable.  When I run the executable, my customized OI appears, I can load sequenc

  • Event Generator Configuration

    Hi there I'm developing an process application for which i have configured two timed and a jms event generator. The question I have is, is it possible to export event generator configurations from my dev box and simply import them into wliconsole on

  • How do I adjust the back light time for my iPod 5th generation?

    I Set my iPods back light timer (not sure what it's called exactly) to one minute. And after realizing that some things get annoying to have to tap the screen constantly to keep it from locking itself I wanted to change it back to "Never" but I forgo

  • Whats happened to applescript runner app in 10.9

    My applescripts wont run under Mavericks because they are calling for Applescript Runner App which does not appear to exist in 10.9. How do you call a script from within a script without this ?