|
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.
|
|
|
|
|
I have not used any of the calls to return a selective list (just the entire list and then steped through it.)
I believe it is quite picky on having a bstr as the argument not a char array as you have. Try declaring a "CComBSTR txt;" and then using it.
What parser version are you using?
Depending on what you are looking for it may be more direct to use an xslt transformation.
To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli
|
|
|
|
|
thanks much
I'm using MSXML v4 (current)
the quoted text is working . . . although come to think of it, I always use BSTR's when convering from CStrings (doing this in MFC)
xslt transformation - I have not yet had the courage to do that in C++ code
About stepping throught the list . . . actually, what I am trying to do is very,very similar to the MSDN example where they recursed through a node set and displayed all the nodes in a CTreeCtrl . . . maybe I'll go back and try to figure out the recursion that needs to be done. If I can recurse through the node tree and keep track of which nodes are child to which, it might be less complicated than I am making it.
|
|
|
|
|
have you looked at Ray Hayes demo?
http://www.codeproject.com/soap/iexmlparser.asp
This was with MSXML 3 but still applys to what you describe.
To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli
|
|
|
|
|
thanks much, good demo, it does apply, and the comments below it were helpful too.
|
|
|
|
|
There is following problem:
Some application (remote COM server) produces
dynamically some JPGs. these files are to be
shown in browser of the remote client.
The current way the things work is the following:
The COM server writes the file to HDD , and returns
url to the file back to client (with other data ,
enclosed in xml file).
Client than reads the url and displays the image
from remote location.
The question is :
Is it possible to embed the JPG file _inside_ XML
file , and than is the client able to display
the JPG directly from XML ?
(or previously having saved it onto local drive ?)
If so, what software (COMponents) to use ?
I heard somewhere that in order to put binary data
into XML file , these data must be BASE64 coded.
What component to use for codeing/decoding
(is this component shipped with windows 2000/XP ?)
Thanx for answer
Michal Januszczyk
|
|
|
|
|
First,
yes you can embedded any data inside an XML data node.
I have encoded binary data just as a server would encoded it to send it to a browser and then decoded it on the other side. Take a look at this page as an explanation.
http://www.nacs.uci.edu/indiv/ehood/MIME/1521/05_Content-Transfer-Encoding.html#5.2
To be conscious that you are ignorant of the facts is a great step towards Knowledge. Benjamin Disraeli
|
|
|
|
|
In my current application, I am using SQLXML to access my data (including JPEG images) within SQL Server 2000. By using a mapping-schema to explicitly map the datatypes (from "image" to "base64binary"), the image is automatically encoded and decoded for me.
|
|
|
|
|
Hello everybody:
I wanna know what exatcly XML is.I find out that I can store some information in XML file and use it during runtime,but what is advantage or disadvantage of this method than using database?When should I use XML and when should I use Acees/SQLServer ? Is XML something more than storing some piece of inforamtion?Any suggestion would be appreciated. Thanks
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|