Re: XML and DOM through MFC?



DOM is a really poor document mechanism, and in general it is very, very limited in what
it allows you to do (I wouldn't touch it with a ten-foot pole). But if you have to use
it, there are a lot of XML packages, including one from Microsoft (MSXML, I think the
acronym is). I believe it is an ActiveX interface, which means you import it into MFC and
it should work just fine.

I tend to use third-party open-source libraries like ExPat (the problem with DOM is that
you can't build graphs, either cyclic or acyclic; you are limited to trees, far to
limiting for serious work).

HTML and RTF are sort-of-unrelated; both deal with formatting and layout (while XML deals
with syntax and allows imposition of semantics on top of syntax). Do you mean how do you
parse HTML or RTF, or how do you just send them? As far as sending them, they're just
characters. As far as parsing HTML, most XML parsers can parse well-formed HTML, but HTML
is rarely well-formed (most of the ill-formed features, such as <p> without matching </p>,
have been deprecated, but they persist and a parser has to deal with them. I've written
HTML parsers, and they are Not Fun To Write because of all the syntax anomalies). rtf is
specified in a document available from Microsoft, and most new Office products and other
Microsoft products conform to the new RTF standard, but older products, third-party
products, and hand-written RTF do not have such well-behaved guarantees. It has been a
*very* long time since I last parsed RTF, but at least in the tools I was using, I recall
it was very straightforward.
joe

On Sat, 27 May 2006 03:59:02 -0700, Harish <Harish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I am new to DOM and XML.
1. Certain device commands are to be stored in a reference file. The
commands exchanged between the device and the PC should be trapped. The
trapping component must parse through the reference file. It is recommended
that the reference file be XML. Can I access Microsoft DOM through MFC?

2. The commands that are exchanged are to be stored as HTML and RTF. How can
I do it through MFC?
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Access 2007 und RTF
    ... Weniger Probleme habe ich sicher mit HTML. ... Sie schreiben nie von RTF, soweit ich das gesehen habe, sondern sie nennen es Rich Text. ... Microsoft MVP Office Access ...
    (microsoft.public.de.access)
  • Re: adding event with parameters dynamically?
    ... Does that imply that there is another type of MS DOM? ... layout engine with the Microsoft Script Engine, ... The MSHTML DOM is the DOM supported by this UA for HTML documents and XHTML ... Prototype.js was written by people who don't know javascript for people ...
    (comp.lang.javascript)
  • Re: problems in messages with received attached archives from otulook 2003
    ... Diane Ross, Microsoft Mac MVP ... Entourage Help Blog ... With RTF it does not work either. ... HTML allows one more a more ...
    (microsoft.public.mac.office.entourage)
  • Re: How can you implement MSHTML.HTMLDocument in ASP???
    ... XMLHTTP object returns the HTML data as a string. ... loads the html into a Html DOM object that can be navigated like the client ... So what I really need is access to the DOM in ASP. ... I would like to be able to implement the Microsoft HTML Object ...
    (microsoft.public.inetserver.asp.general)
  • Re: can some1 help with my kink is java
    ... And the differences between those two types of DOM (by ... We have the HTML DOM, with its case insensitivity, historical ... While the XHTML DOM is case sensitive, ... scripting one DOM is likely to get in the way when scripting the other. ...
    (comp.lang.javascript)