+ Reply to Thread
Results 1 to 12 of 12

MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

  1. #1
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Hi,

    I am sending a request using MSXML2.XMLHTTP60.

    The Input parameters is a lengthy XML String which is generated by Excel.

    The XML string when displayed in immediate window breaks at every 1024th character as it should.

    I checked the string in an online XML Formatter and it is fine.

    If I make the string in a cell (Using Concatenate & Call Values to generate XML) & pick it up from a cell, the Request returns the desired response.

    But when I use it from a variable, I get DTD Is Prohibited Error.

    I am certain, the linefeed at 1024th character is causing the problem.

    Can anyone suggest a work around??
    Last edited by NeedForExcel; 12-28-2017 at 01:59 AM.
    Cheers!
    Deep Dave

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Posting your code might help. Without that, have you tried a simple Replace function?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Here you go.

    Sheet with Codename shInputJSON has XML Parameters from Cell A1 to Cell A48.

    Can't post the code for some reason, so here is the link -
    https://justpaste.it/1f1wn

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Perhaps the problem is that you do not resize when you offset. I would suggest trying
    Please Login or Register  to view this content.

  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    It does work.. Thank you so much for it..

    However, I have still not understood why it works..

    Can you clarify a bit if you have the time??

    Cheers!

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    If you don't resize, you are including a blank cell in the array and therefore in the parameters array, so you end up with an errant space at the end when you join the array. It seems that causes the error.

  7. #7
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Quote Originally Posted by xlnitwit View Post
    If you don't resize, you are including a blank cell in the array and therefore in the parameters array, so you end up with an errant space at the end when you join the array. It seems that causes the error.
    Hi,

    Thank you for the reply. However, does that extra space make any difference, as the inputs parameters are XML Tags.

    Also, I after testing a few times, I observed that after your solution I still get that error occasionally.

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Did you try uncommenting this line
    Please Login or Register  to view this content.
    Does the error happen consistently with the same parameter set?

  9. #9
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Yes..

    It does happen with the same parameter set.

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Then I think you need to debug what XML you are actually getting back.

  11. #11
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Alright.. Thank you fir the help so far..

    If I am able to get a solution I will post it here.

    Thank you for the help..

    Cheers!

  12. #12
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: MSXML2.XMLHTTP60 - XML Request Parameters - DTD Is Prohibited Error

    Quote Originally Posted by NeedForExcel View Post
    ...Can't post the code for some reason, so here is the link - ....
    Can't post the code because of things like this I expect...Dave..
    <FNum _ <iKey
    https://www.excelforum.com/tips-and-...rkarounds.html

    ( _ First 4 characters after a _ < _ )

    https://imgur.com/6nghaXG
    Last edited by Doc.AElstein; 01-09-2018 at 08:27 AM.
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Web Scrape XMLHTTP60 vs InternetExplorer,Application
    By greensky2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-31-2017, 07:59 PM
  2. [SOLVED] Error: No value given for one or more parameters
    By SBBmaster09 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2016, 07:11 AM
  3. [SOLVED] xml or winhttp - Can I send a POST request with a lot of parameters?
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 04-02-2015, 04:52 AM
  4. No value given for one or more parameters error
    By anrichards22 in forum Access Tables & Databases
    Replies: 3
    Last Post: 12-08-2014, 09:49 AM
  5. Code execution prohibited by shared function
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-04-2014, 06:24 AM
  6. [SOLVED] Access to Edit Macro prohibited in Excel 2010
    By ybortony in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2013, 02:12 AM
  7. MSXML2 - getElementsByTagName()
    By hoopz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2006, 03:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1