473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

IXMLDOMElement from IXMLDOMNode - how ???

It's part of code:

IXMLDOMElement *pPar = NULL, *pChild= NULL;
IXMLDOMNode *pNode = NULL;

bstr = SysAllocString(L"1sth");
pXMLDom->createElement(bstr, &pPar);
SysFreeString(bstr);

bstr = SysAllocString(L"2sth");
pXMLDom->createElement(bstr, &pChild);
SysFreeString(bstr);

pPar->appendChild(pChild, &pNode),

and now when I'm trying get parent from pChild

pNode = NULL;
pChild->get_parentNode(pNode);

pNode have diffrent address than pPar. How can I get proper address of
pPar from pChild ?????
Jul 20 '05 #1
2 5594
Using the special COM method called QueryInterface.

"ragi" <ra*******@interia.pl> wrote in message
news:ci**********@mamut.aster.pl...
It's part of code:

IXMLDOMElement *pPar = NULL, *pChild= NULL;
IXMLDOMNode *pNode = NULL;

bstr = SysAllocString(L"1sth");
pXMLDom->createElement(bstr, &pPar);
SysFreeString(bstr);

bstr = SysAllocString(L"2sth");
pXMLDom->createElement(bstr, &pChild);
SysFreeString(bstr);

pPar->appendChild(pChild, &pNode),

and now when I'm trying get parent from pChild

pNode = NULL;
pChild->get_parentNode(pNode);

pNode have diffrent address than pPar. How can I get proper address of
pPar from pChild ?????

Jul 20 '05 #2
I've tried it but returned pointer was still different than orginal.
Up to now one good solve of this problem is holding stack of orginal
pointers in global userspace, but it is not so elegant as I wanted to ....

Chris Lovett wrote:
Using the special COM method called QueryInterface.

"ragi" <ra*******@interia.pl> wrote in message
news:ci**********@mamut.aster.pl...
It's part of code:

IXMLDOMElement *pPar = NULL, *pChild= NULL;
IXMLDOMNode *pNode = NULL;

bstr = SysAllocString(L"1sth");
pXMLDom->createElement(bstr, &pPar);
SysFreeString(bstr);

bstr = SysAllocString(L"2sth");
pXMLDom->createElement(bstr, &pChild);
SysFreeString(bstr);

pPar->appendChild(pChild, &pNode),

and now when I'm trying get parent from pChild

pNode = NULL;
pChild->get_parentNode(pNode);

pNode have diffrent address than pPar. How can I get proper address of
pPar from pChild ?????


Jul 20 '05 #3

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

Similar topics

2
by: Who Cares | last post by:
Okay, this may be a bit of a newbie question but I could really use some help. I want to write a set of routines that will read in the contents of XML files. I'll be reading the tag names,...
4
by: Li Weng | last post by:
Hi, I have two questions: 1) If there are more than one attachments, can I still use urn:schema:httpmail:attachmentfilename to get the file names? How? Or I need to use X-MS-ENUMATTS method? ...
1
by: ragi | last post by:
It's part of code: IXMLDOMElement *pPar = NULL, *pChild= NULL; IXMLDOMNode *pNode = NULL; bstr = SysAllocString(L"1sth"); pXMLDom->createElement(bstr, &pPar); SysFreeString(bstr); bstr =...
0
by: Marc Hansen | last post by:
Hello, I use MSXML with BCB 5. This works just finde to me. Now i got to a mysterious point and I think MSXML is what does this. I made a function which is applied to be calles with a...
2
by: SHC | last post by:
Hi all, I ran the attached volcanoes.xml (with geology.dtd) in the Module of Access 2003. I got the following error: Microsoft Office Access You have error Invalid Character in content model....
0
by: Sivaprasad | last post by:
Hi All, I have an xml, one of the attribute is having binary data. I want to extract that binary data and put it into a word doc. this is what i want to do. node.datatype="bin.base64"...
0
by: Sathya | last post by:
Hi, I have a vb.net webservice which takes XMLDocument as a parameter and returns bool. Signature of the method is some thing like this AddXmlEmpDetails(xmlEmp as XMLDocument) as Boolean. I...
0
by: Alamelu | last post by:
I wanted to remove "Name" attribute from the below tag, but i am only having IXMLDOMNode pointer and not IXMLDOMElement pointer of "Option". But removeAttribute method is only available in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
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,...

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.