the api IXMLDOMDocument::Load fails if the filename has more than 256 charcters, i do not want to use loadXML, is there any way to enable it to take files with long file name
mohit.jha@gmail.com wrote: > the api IXMLDOMDocument::Load fails if the filename has more than 256 > charcters, i do not want to use loadXML, is there any way to enable it > to take files with long file name Which version of MSXML are you using? -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
4.0 On Jun 11, 8:35 pm, Martin Honnen wrote: > mohit....@gmail.com wrote: > > the api IXMLDOMDocument::Load fails if the filename has more than 256 > > charcters, i do not want to use loadXML, is there any way to enable it > > to take files with long file name > > Which version of MSXML are you using? > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/
mohit.jha@gmail.com wrote: > 4.0 The MSXML SDK says that load takes a URL as a string and I can't believe that it fails if the URL is longer than 256 characters. What value exactly do you pass to the load method? What error do you get? Have you tried to use a file: URL e.g. file:///C:/dir/subdir/subsubdir/file.xml? -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/
"Martin Honnen" wrote in message news:%23jUbI49yIHA.3972@TK2MSFTNGP03.phx.gbl... > mohit.jha@gmail.com wrote: >> 4.0 > > The MSXML SDK says that load takes a URL as a string and I can't believe > that it fails if the URL is longer than 256 characters. > What value exactly do you pass to the load method? > What error do you get? > Have you tried to use a file: URL e.g. > file:///C:/dir/subdir/subsubdir/file.xml? > > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ Probably the limitation is a Windows limitation. The VC header stdlib.h has the following define: #define _MAX_PATH 260 /* max. length of full pathname */ The comment says that it is for "Sizes for buffers used by the _makepath() and _splitpath() functions." but that symbolic name is used frequently in the Windows samples. The value 256 or 260 is documented somewhere as the maximum size of a Windows filename without using the "UNC" (Universal Naming Code) format. I think the sample file URL above does not use the UNC format but I am not sure.