need little help with MSXML

Hi
   I am using MSXML in my VC++ project.My problem is that I will be
having some XML documents and in those documents I need to get the
data inside the <title> tag and <link> tag.this two tags will be
always inside <item> tag.But they will not be in any order.Previously
the code I was using is:

    	if(NODE_ELEMENT==pChild->nodeType)
	{
	if(_bstr_t("item")==pChild->nodeName)
	{
                pChild=pChild->firstChild;  //assumed that title tag
is first tag
                m_node.push_back(pChild->text);
                pChild=pChild->nextSibling; //assumed link tag is
second tag
                m_link.push_back(pChild->text);
                }
                }

But I can not assume like this,title tag and link tag will not be the
first and second tag always.So is there any other method or property
of MSXML which can solve my problem.Plz help me with code.Thanks in
advance.

0
rindam2002 (29)
6/27/2007 10:21:56 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
553 Views

Similar Articles

[PageSpeed] 8

You can use XPath syntax to get all <link> nodes under <item> nodes
and/or all <title> nodes under <item> nodes.
I'm not very sure about the syntax but, you could use the following:

var objXMLDOMNodeList = oXMLDOMNode.selectNodes(expression);

where 'expression' is the string specifying an XPath expression.

For eg. " .//title "  will give you all <title> elements one or more
levels deep in the current context.


-Seetharam






0
smisro (101)
6/27/2007 12:47:28 PM
On Jun 27, 5:47 pm, Seetharam <smi...@gmail.com> wrote:
> You can use XPath syntax to get all <link> nodes under <item> nodes
> and/or all <title> nodes under <item> nodes.
> I'm not very sure about the syntax but, you could use the following:
>
> var objXMLDOMNodeList = oXMLDOMNode.selectNodes(expression);
>
> where 'expression' is the string specifying an XPath expression.
>
> For eg. " .//title "  will give you all <title> elements one or more
> levels deep in the current context.
>
> -Seetharam

Can u help me with code for vc++.What I am getting for selectNodes is
in javascript.can u send me the code plz to solve my problem?

0
rindam2002 (29)
6/28/2007 4:37:45 AM
Have a look at this link. Its all there in MSDN.

http://msdn2.microsoft.com/en-us/library/ms754523.aspx

-Seetharam

0
smisro (101)
6/28/2007 6:08:42 AM
Reply:

Similar Artilces:

Org Charts?? Please help
Can anyone please help me with org charts? I need to create one that has from president down how do I create one that fits tons of people?? thank you so much.. I could use the help with either visio or powerpoint, if visio how do I transfer to powerpoint..if anyone can give me some examples that would be awesome, ive never done done :( -- 2 Hi, you can insert Orgcharts in PPT 2003 via Insert menu -> Picture-> Orgchart or in 2007 via insert tab->Illustrations group->Hierachy... all shapes/labels will be resized in accordance to the number of shapes to keep every...

HELP! Where do i find incoming and outgoing server information?
Hi im trying to add my first account to outlook and i get as far as it asking me for server information. Im using an MSN email account but dont kno whwere to find the incoming and out going server information? PLEASE HELP! lizzie 13 <lizzie 13@discussions.microsoft.com> wrote: > Hi im trying to add my first account to outlook and i get as far as > it asking me for server information. Im using an MSN email account > but dont kno whwere to find the incoming and out going server > information? Is this MSN account a POP account (for which MSN would have sent you server det...

ask help for DLL Export Library Definition File
Hello, guys! I got a problem when I build an MFC App which call a MFC Extension DLL that has implemented some API, but I don't know where is the problem, in DLL, in dll def file or in MFC App? the API like this: ___________________________________________________ head file extern "C" AFX_EXT_API long WINAPI PassThruConnect ( unsigned long ProtocolID, unsigned long Flags, unsigned long *pChannelID ); cpp file extern "C" long WINAPI PassThruConnect ( unsigned long ProtocolID, unsigned long Flags, unsigned long *pChannelID ) {....} and its def file like this: __...

help with filtering
Hi, How do I use the autofilter to show me three items. It only seems allow me two when I use the custom filter. thanks Susie Hi do you mean 3 conditions?. If yes this is not possible with the autofilter -- Regards Frank Kabel Frankfurt, Germany Susie wrote: > Hi, > > How do I use the autofilter to show me three items. It > only seems allow me two when I use the custom filter. > > thanks > > Susie Susie, Advanced filter may be the answer http://www.techonthenet.com/excel/filters/advanced2.htm Barbara Susie wrote: > Hi, > > How do I use the autofilter...

Looking for help with "440 Posting Not Allowed" server error
Please help anybody . . . I have been able to post messages via microsoft's news server but when I try posting to those same newsgroups via titannews.com (for which I am a paying subscriber) I always get a "440 Posting Not Allowed" server error. This wouldn't have anything to do with needing posting privelages for the newgroup would it? If it's a server error then it's not even getting to the intended newsgroup? Or may this type of error result from other causes? Maybe there's a seasoned news server user who can point me in the right direction for resolving t...

If IsNull...And...= Then Help!
I am trying to us If IsNull to create requirements on a form that need to be fulfilled, but I don't think I have the "language" quite right. Can anyone help me correct this? Here is what I have so far: Private Sub SubmitFitConcern_Click() If Len([CountermeasureDate] & "") = 0 Then MsgBox "You must select a Countermeasure Date." Exit Sub End If If Len([CountermeasureDate] & "") < (RequestDate) Then MsgBox "The Countermeasure Date must be greater than the Request Date." Exit Sub En...

Need Excel help on how to create a invoice.
i'm in abit of a dilema my project requires me to create an invoice bu i have no idea to do it, does anyone have msn/icq that can go thoug the process of creating an invoice with me.. thx in advance, any help appreciated -- translatio ----------------------------------------------------------------------- translation's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2612 View this thread: http://www.excelforum.com/showthread.php?threadid=39454 anyone? able to help me :) -- translation -------------------------------------------------------------------...

Help, how do I import a CSV file when Negatives are in Parenthesis
I am attempting to import a Comma Separated Value (CSV) file into an MS Access 2007 mdb table. The table consists of text and numeric (defined as Double) fields. Unfortunately, negative amounts are NOT enclosed by double quotes in the CSV file, instead the are enclosed with parenthesis signs. Example: "10,485.16","24",(42),"16.35",(835.33) Currently, when I import the CSV file, the negative amounts are NOT imported. I need assistance with how to import these negative amounts. Thanks in advance. "ND Pard" <NDPard@discussions....

Visual Basic for Applications Help not working right.
OS = WinXP Home and Pro with SP2. Under Office 2003 Professional Edition with SP1, if I open the VBA Editor and search for a function (say Msgbox) I get a whole list of things that can be displayed. All selections respond to a mouse click and provide a wealth of information except for those noted as (Visual Basic for Applications.) For those, nothing happens -- the system just sits there with the mouse cursor changed to a hand. I have gone to Control Panel/Add Remove Programs and followed the instructions that appear in several places on the web for adding the VBA help files. The ...

trying to open .CHM help file
Can anyone help me please? i am trying to open a .CHM help file via a command button on my form. I have tried using SHELL but that doesnt work, presumably because it is not a .EXE. any help greatly appreciated Already answered in another newsgroup to which you posted the same question. If you feel you need to post to more than one group (HINT: it's seldom necessary), please have the courtesy to cross-post (send the one message to all groups at once), rather than multi-post (send individual messages to each group). In this way, all responses to your post will be available together, ...

need help writing function
Column A has Days of the week listed for the entire month Column B has data listed for days of the week Want formula to count data in column B if it equals a certain day of the week like if sunday then count all data listed for sundays in column B "a" "B" Sunday 21 Monday 15 Tuesday 28 Sunday 14 Monday 10 Tuesday 12 sunday=35 Monday=25 Tuesday=40 Hi, Let's assume th...

Sum of Numbers appear as zero- Please help
Please help! I have a spreadsheet that adds up sales projects for each of our territories into a total company. When I went back to verify the calculations, I realized that zeros were appearing in some of the calculations. It appears that the column format was set to text. I've tried to change it to general or number but nothing works unless I retype everything. Is there something else I can do? Example: Group 1: =sum(A1:A2)=0 [Should be 700] Product 1: 200 Product 2: 500 Any ideas would be greatly appreciated. Tina Hi Tina - Put the number 1 in a blank cell (that is form...

change from copy & paste task pane (yuk) to c&p little box
Help I hate the task pane for copy and pasting it is too big and too far away from the copy and paste area I much prefered my office 2000 little copy andpaste box that came up automatically, the task pane doesn't even if the it's checked to.Is there a way I can get the little box display of copy and paste items instead of the task pane. ...

Please help and visit my site
http://www.requestforhelp.org Thankyou Sian ...

Formula Help 01-04-10
I am trying to do the following and can't figure out the formula. I have cells across a column that have one of the following numbers: 0,1,2,3,4. I want to get the number of cells that have a 1 or a 2. For example, lets say A3 is a 1, C3 is a 3, E3 is a 4 and G3 is 2. I want the forumala to give me 2 (1 in A3 and 2 in G3). I am sure it is fairly simple, but I can't figure it out. Thanks Try: =COUNTIF(A3:Z3,1)+COUNTIF(A3:Z3,2) -- Gary''s Student - gsnu200909 "Casey" wrote: > I am trying to do the following and can't figure out t...

Need some help with excel spreadsheet...
I'm running excel 2003 on a winxp pro machine. I have a spreadsheet with the following information. Cust Number, Cust Name, Inv Num, Inv Date, Description, Amount There are many invocices per customer number. The date appears as 1YYMMDD. There are a couple of things I would like to Change. I want to change the date to MMDDYY format. I want to add the amount on the invoices and have the following per customer numnber: Cust Number, Cust Name and a Total amount from the invoice amount. Instead of having one 5 lines for 5 invoices for 1 customer number I want to have 1 customer number an a ...

Need a Send All action on a quick campaign
When I create a quick campaign, the CRM creates all of the email activities as draft, but does not send them. The only way to send the emails is to open up each one individually and click the send button. There REALLY needs to be a way to review a few of them, then select "Send all" from the actions menu. There must be an easier way to send multiple emails at the same time. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message p...

Encrypted Key For Signing Help
I've opened an old VB project that I've not touched in nearly a year and when I go to build, it says this: IMPORT KEY FILE - THIS PROJECT INCLUDES A PASSWORD-ENCRYPTED KEY USED FOR SIGNING. How do I remove or recover the Password? Thanks! Brian "Brian" <nospam@nospam.com> wrote in message news:314B657C-F24E-4BED-8128-F77A7079ED9D@microsoft.com... > I've opened an old VB project that I've not touched in nearly a year and > when I go to build, it says this: > > IMPORT KEY FILE - THIS PROJECT INCLUDES A PASSWORD-ENCRYPTED KEY US...

I need to download an exel spreadsheet file. (file extension :xls)
I have been sent a document created in exel, a spreadsheet. I cannot open it on my pc windows xp home edition, microsoft online suggested file extension :xls, an exel spreadsheet file. Ihave searched thier website for this download but cannot find it. Can anyone advise me of wiere to locate this download or how to open this file any other way ? Hi some ways: 1. BUY MS Excel / MS Office to open an Excel file 2. Use the free Excel viewer (search the MS site for it) 3. Download Openoffice (www.openoffice.org) Note: Excel/Office is NOT part of Windows XP but a separate product. "buckro...

Please help...writing to XML file
I have looked in all my books and online and can't find a way to make this rather simple task work. Could someone please review the code and see what errors I've made? Thanks!!!!!! I have an aspx for with a textbox and a button. The goal is to simply have the user type a message, hit the button and it should append to the XML file. I can open the aspx in the browser with no problem, but the XML file does not get updated. What's wrong with this code? Thanks! <script runat="server"> Private Sub Page_Load(ByVal sender As System.Object, _ ByVal e As System.Event...

Help required to create a Chart at Runtime and export it to a web page
Hey Friends I am trying to export some values to a excel sheet and then create a Graph for the values. I tried to create a excel template and then export values to it but if i use a chart in the excel template then i have to define the range but the range is known after the data has been exported. Can someone please help me for creating graph at runtime in excel. Moreover when i save the excel sheet as webpage the page is saved with blank entries as well. So number of pages to print out becomes 3 instead of actual number of pages. but i want only actual number of pages to print out and ign...

strange characters appearing on emails need help to stop this happening please
I have set up my outlook express on my lap top. (vista home premium) had a problem with the coding changing seemed to fix that but am now getting this at the bottom of sent emails, any ideas what I should do please? Oh, and I am an OAP and need very simple instructions please, I can be a bit of a thicko. &#20540;&#15422;&#21064;&#15422;&#20527;&#15422;&#15952;&#3338;&#17212;&#20037;&#17748;&#15954;&#18748;&#18253;&#21280;&#17234;&#8765;&#18755;&#14916;&#14459;&#16948;&#13105;&#17477;&#...

OWA Question
Can anyone help me with this problem? We use Public Folders on our exchange server in order to have a central place to post info like programs, pricelists, telephone lists, etc. We have some external users who wish to use Outlook Web Access (OWA) in order to be able to view their mail. Because they're not in the USA, dialup is not an option for them. Because they're satellite connected, they cannot use VPN. The problem with it that we've seen is Public Folders (and forms), which are really 2 problems. First: The folders display fine. The contents of them, the dates, etc. sh...

need to rotate page 90 degrees to type horizonal
I have a grid sheet that i need to type on left side horizonaly, and on top horizonaly, how is this done, thank you ...

Problems with Excel 2003 Help menu
I am trying to utilize the help in excel (it is actually the vb editor help) and when I look up topics, a lot of the links do not work. For example... I search for "loop" and it brings up a whole list of topics to look at, but only about half of them work. I want to look at the topic titled "Looping through code..." which I have looked at before on other computers but here it will not go anywhere. It is like the link is dead. I have tried "fixing and repairing" from the help menu but that didn't help. Has anyone else seen this and does anyone have any s...