Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How Could I get rel or type information from "<link href="http://style.css" rel="stylesheet" type="text/css" /> "

0 views
Skip to first unread message

Fred

unread,
Sep 24, 2008, 2:51:29 AM9/24/08
to
Hi, all:
I possess little knowledge about COM, however, I need to modify a
COM-related program. I've got such problem: there is a variable pNode
with type CComPtr<IHTMLDOMNode>, and it points to a "link" node. In
HTML source, the node looks like "<link href="http://style.css"
rel="stylesheet" type="text/css" />". I want to retrieve value for rel
(stylesheet) and type (text/css) by whatever method. After looking up
MSDN I find several possibilities: get_nodeName(), get_nodeValue(),
get_nodeType(), but none of them could returns what I need.
get_nodeName returns "link" of course, get_nodeValue() returns NULL
and get_nodeType returns an integer. How could I get detailed
information about a certain node? Thanks a lot for helping me.

Igor Tandetnik

unread,
Sep 24, 2008, 7:45:21 AM9/24/08
to
"Fred" <hn.ft...@gmail.com> wrote in message
news:06bd22b9-1f8e-4926...@x16g2000prn.googlegroups.com

> I possess little knowledge about COM, however, I need to modify a
> COM-related program. I've got such problem: there is a variable pNode
> with type CComPtr<IHTMLDOMNode>, and it points to a "link" node. In
> HTML source, the node looks like "<link href="http://style.css"
> rel="stylesheet" type="text/css" />". I want to retrieve value for rel
> (stylesheet) and type (text/css) by whatever method.

Query the pointer for IHTMLLinkElement, use its get_rel and get_type
methods.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


Fred

unread,
Sep 25, 2008, 9:16:27 PM9/25/08
to
On Sep 24, 7:45 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
> "Fred" <hn.ft.p...@gmail.com> wrote in message

thanks very much!

0 new messages