|
Try & or & if you want to show an & character in your output.
|
|
|
|
|
MarSCoZa wrote:
Try & or & if you want to show an & character in your output.
Hi,
thanks for your answer. Could you please provide all sequences for all the five special characters (I think its five) because I don't know where to look for on the web.
Thx a lot!
Stefan
|
|
|
|
|
|
You might want to take a look at the W3C's Blueberry spec on character sets in XML.
Cheers,
Simon
"Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
|
|
|
|
|
I have some code I wrote ages ago, and now it won't run on my machine at work ( but it runs on everyone elses ). I have IE6 and we've found conversely that ome of my XSL *only* ran on my machine. The problem is when I have a list of nodes, all siblings, and I loop through them and use appendChild to cut and paste them into another document. It simply blows up. Any suggestions ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
I'm testing this and not having any problems. Can you post some sample code?
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
I'll get it from work tomorrow. Basically it works on other machines but not on mine, and I *think* IE6 may have an influence. The thing is, the block of code that fails I wrote some code to look the same, and it worked. I worked late on Tuesday and I spent from 5 to 10:30 on this, then three more hours the next day and we dropped it in the end simply because it's only my machine that won't run it. Which means I can't run a central piece of code for the project, which I wrote.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
You have check the xml parser versions are the same correct?
|
|
|
|
|
We've installed the latest version of MSXML on all machines, but I believe that IE6 changes something in that regard.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
OH!, this one looks like it could be related to a question i just posted in the ASP forum.
Our problem is that HTML being parsed perfectly well in IE5 suddenly seems to miss items in listboxes when parsed by IE6.
As i am currently doing some consulting away from our home office i am not able to view the source, but if my co-workers are still using my scripts then those list boxes are filled dynamically by traversing nodes in the DOM.
If we could get this behaviour cathegorized as a genuine bug and not 'a new IE feature', then we could tell our customers to use IE5 while waiting for the next patch.
"It could have been worse, it could have been ME!"
|
|
|
|
|
I am still able to traverse nodes, it's when I call appendChild, and then not always. I did a full reinstall, and we're fairly sure it's not related to IE6 ( although I've not reinstalled it ), but the general death of my machine.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
here are two great links for beginning DOM programming in C++:
http://codeguru.earthweb.com/xml/XMLDOMFromVC.html - a basic, great tutorial
microsoft
http://msdn.microsoft.com/Downloads/samples/Internet/
select xml, and I think the MFC tree control is the XMLTree simple application.
|
|
|
|
|
Thanks Todd! The first one is mine
I've never posted it here because it wrote it so long ago that I figured it was probably too beginner-level at this point.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
Tom, I don't suppose you have any idea what my problem is with appendChild not working ? I posted the question above this one, and I'm kinda desperate ...
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
I'll look now...
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
By the way, Christopher is all impressed with himself that you're quoting him in your sig
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
Tom Archer wrote:
By the way, Christopher is all impressed with himself that you're quoting him in your sig
I wanted to as soon as he said it, but I'd only just changed it, so I kept Jamies comment for a bit, then went back in the posts to find this one again.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
|
you know, I've had so much trouble with path syntax and checking if GetNode type statements returned null or not, that I started putting together my own short list of XML "stuff", but it hasn't really evolved into a useful tutorial. The hardest thing for me is still that "I just want to get data out like it was Access or a *.ini file, or a flat file", and the XML DOM sometimes seems to make what should be easy , difficult. (once it works it is fantastic)
Your tutorial was very helpful to me and my current project - I started out attempting something like what was in C++ Journal in the January issue , where I specify all the structs/variables for our project in XML, and then I generate the C++ code from that, I generate the C++ code in to read all the variables and populate the structs from the XML file, I change an MFC dialog on the fly to get or set variables in the data in my config screen. I started thinking at the beginning - here I have these different ways of formatting what is essentially the same data - I have C++ code, I have *.h include files, I need *.ini files, I need to edit my MFC dialog - why can't I just feed it all off the XML and use that to unify these various data structures? I got it working, but explaining it to our engineers has got me to back off from trying to force them to use the generating features. But it is still very handy to have C++ code plus the min/max validation data, the comments that explain what that variable is, the list of potential values, etc. all in one place. Someday somebody is going to make some money by providing a tool where we can specify data in XML, because when a guy creates a new variable, if he knows what the max/min values are to be, wouldn't be great if he could spell all that out in one place, and then it would be useable in his program, and all the other developers were doing the same thing, and multiple variables weren't created for the same purpose, etc.
Oh well, sorry for the long text. I could not live without the tutorials at CodeGuru and CodeProject (at least as a Windows/MFC developer). Your tutorial was very easy to understand and helpful.
|
|
|
|
|
Todd.Harvey wrote:
I just want to get data out like it was Access or a *.ini file, or a flat file", and the XML DOM sometimes seems to make what should be easy , difficult
Now that's an understatement
Todd.Harvey wrote:
Your tutorial was very easy to understand and helpful
Thanks!
I'll give some thought to your other remarks as you might be onto something there...
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
Actually, I've updated that tutorial a great deal for an XML chapters I just did for my MFC book. I'll post it some time this weekend.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
I have an application that collects a bunch of data and stores relevant information in an XML file. A subset of the data is to be written to a CD-ROM, and a set of HTML pages are created with content customized from the contents of the XML file, to provide an easy user interface to the contents of the CD.
The problem is that some of the data that is collected is stored in TIF files, with the filenames stored in the XML file. Using the HTML [a] tag with "href=img.jpg" makes a nice link so the jpg image is displayed, but this doesn't seem to work with TIF files. Can't Internet Explorer display tif files from within HTML?
From my desktop, when I double click on a tif file, I get this "Imaging for Windows" application that displays the file. Well, that's alright, but how can I get that same thing to happen from my HTML link? How can I start an application with a specific file as an argument from within HTML?
Only because these HTML files are being generated from the contents of the XML file did I think it appropriate to try this forum. Thanks, too, for all those who helped me get the XML file "formatted" so it could be seen in an editor.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
Dave,
IE should recoginise the image/tiff type
Ref:
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/moniker/overview/appendix_a.asp
I have QuickTime loaded on my system and all of the following work fine.
<object width=200 height=200>
<param name="src" value="yourfile.tif">
<embed width=200 height=200
src="MyFile.tif" type="image/tiff">
</object>
<embed width=200 height=200
src="MyFile.tif" type="image/tiff">
some comments may also be found at;
http://www.alternatiff.com/howtoembed.html
I know nothing of there viewer. Which could be your issue. IE knows the filetype but does not have a viewer for it.
To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli
|
|
|
|
|
Michael,
Thanks for your comments. I was able to finally figure out what was going on after much research, reading, testing, and frustration. Here's a summary, which may be of help to others.
Web browsers (IE and Netscape Navigator, and apparently on both PCs and Macs) are not able to view TIFF files as a native format (like for BMP, JPG, and GIF). They all require help, either from a TIFF plugin for IE, or "helper applications" for NN. The Alternatiff product is a free plugin so that IE can display TIFF files.
The other option, though, is that IE (and I'm assuming NN also) uses the file associations to initiate the proper program to display files that IE does not recognize, such as .xls Excel spreadsheets or .doc Word files. With html links to those files, the corresponding app loads the linked file and displays it in the browser. This is also seen frequently with .pdf files when Adobe Acrobat starts up.
This should have worked on my machine for TIFF files, as when I double click on a file from the desktop, the Imaging For Windows application (either from Wang or Kodak) started up with the file displayed. But, it was not working for the same file in an html href link. The problem turned out to be two entries in the registry, underneath the Software/Internet Explorer/Plugins path ... one entry for tif and one for tiff. Both were there, but had no values.
What this was causing, therefore, was IE to believe that there was a plugin installed for tif/tiff files, and that it should use that plugin to display the file in the browser window. Since the plugin entries were empty, IE didn't have an application to use, so it displayed an empty image. When I deleted those two entries in the registry, IE could find no plugin and defaulted to the file associations, as expected.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
I'm generating some C code from XML, and now I want to generate sub Structs.
I know I can do the following (a child node of same name as parent node),
<struct "name"="top">value
<struct "name"="sub">value
But what I'm having problems with is getting the top-level structs with SelectNodes, and then getting sub-level structs with SelectNodes (or other select commands).
I've been doing things like:
//StructList = xDB->m_pDomDocument->getElementsByTagName("Struct");
StructList = xDB->m_pDomDocument->selectNodes("//Struct");
and have not gotten lucky yet.
|
|
|
|
|