473,513 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xerces parser won't open file with brace in the name

Hi,

I am trying to parse a file using Xerces' DOMParser.parse(String systemId)

I have come across a problem where it refuses to open a file with curly
braces "{" or "}" in the file name. I just get a SAXException saying the
file does not exist

is it trying to do some kind of parameter substitution into the filename?

Andy
Jul 20 '05 #1
3 2299
In article <VZ*********************@news-text.cableinet.net>,
"Andy Fish" <aj****@blueyonder.co.uk> wrote:
:Hi,
:
:I am trying to parse a file using Xerces' DOMParser.parse(String systemId)
:
:I have come across a problem where it refuses to open a file with curly
:braces "{" or "}" in the file name. I just get a SAXException saying the
:file does not exist
:
:is it trying to do some kind of parameter substitution into the filename?
:
:Andy
:
:


This isn't an issue with the parser. Try simply reading that same file
as a stream of bytes, for instance, and you should find that it's
something else. Solve it there and you'll be able to parse it. How
it's solved probably depends on language, OS, filesystem, etc.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
Jul 20 '05 #2
In article <VZ*********************@news-text.cableinet.net>,
Andy Fish <aj****@blueyonder.co.uk> wrote:
I have come across a problem where it refuses to open a file with curly
braces "{" or "}" in the file name. I just get a SAXException saying the
file does not exist


System identifiers are URIs, and "{" and "}" are among the characters
that have to be escaped when used in URIs. The parser *ought* to do
this for you, but I wouldn't be surprised if it doesn't. Try using
%7B instead of { and %7D instead of } to see if that's the problem.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #3
not so, I'm afraid. This works fine:

parser.parse (new InputSource(new FileInputStream(filename)));

but these do not:

parser.parse (new InputSource(filename));
parser.parse (filename);

Anyway, thanks for the idea. At least I have my workaround now :)

Andy

"Steve W. Jackson" <st***********@charter.net> wrote in message
news:st*********************************@news.fu-berlin.de...
In article <VZ*********************@news-text.cableinet.net>,
"Andy Fish" <aj****@blueyonder.co.uk> wrote:
:Hi,
:
:I am trying to parse a file using Xerces' DOMParser.parse(String systemId):
:I have come across a problem where it refuses to open a file with curly
:braces "{" or "}" in the file name. I just get a SAXException saying the
:file does not exist
:
:is it trying to do some kind of parameter substitution into the filename?:
:Andy
:
:


This isn't an issue with the parser. Try simply reading that same file
as a stream of bytes, for instance, and you should find that it's
something else. Solve it there and you'll be able to parse it. How
it's solved probably depends on language, OS, filesystem, etc.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11526
by: David | last post by:
Hello , I'm trying to parse an XML document a get spicific tags such as email in the code below. I'm using xerces 2.4. However I don't manage to get the value for the email. Can anybody help. thanks in advance, david ---------------
2
4641
by: Olaf Meyer | last post by:
Apprentently xerces 2.6.0 (Java) does not validate against contraints specified in the schema (e.g. constraints specified via unique element). The validation works with the XML editor I'm using (XMLSpy4) but not with Xerces 2.6.0. I've included a really short and simple example to illustrate it. I would like to get some comments on the...
0
3041
by: Xamalaek | last post by:
Hello, I need some help with the DOM TreeWalker API. I modified the Xerces DOMPrint sample because I wanted to play around with the DOMTreeWalker API to iterate through the sample.xml file. Unfortunately I can't get the treewalker to spit out anything ... it seems others have had similar problems as well see:...
2
3916
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home Canonicalpath-Directory4: \\wkdis3\ROOT\home\bwe\ You selected the file named AAA.XML getXmlAlgorithmDocument(): IOException Not logged in
3
2746
by: ciaran.mchale | last post by:
Hi folks, I downloaded the binary version of Xerces C++ 2.7.0 for Windows and am using it to help me get up to speed with XML and XML Schema. So please excuse me if this is a "novice" question. In the samples/data directory, I ran the following command for all the files: DOMPrint -n -s -f -v=always <filename>
9
6700
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP page, I want to grab a URL and parse /change the HTML and send it to the JSP page. I take the URL from the user in a textbox (not the
3
3377
by: Matt | last post by:
Hello, Summary: Where can one download a Xerces-C (XML pardser) dynamic library file (.DLL file) for Windows (Win98/WinNT/Win2k/WinXP/Win2003, including server flavors; don't need to support pre-98) without having to build the library from source? We posed this question to the Xerces-users email list, but have yet to
1
4723
by: Nuno | last post by:
Hello, I'm looking for a way of validating/parsing the xsd file (schema), i only been able of validating the xml file with the corresponding schema, but what i want is only validate the xsd file, to check if the schema is valid. I'm using Xerces-C++ and the only thing that i found is a way of parsing the xml file with the xml schema like...
9
2988
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13> <binaryobject3></binaryobject3>
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7559
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7123
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.