Off topic: VB6 question - adding nodes to msxml

sorry this is way off topic.

using _vb6_: i'm trying to add/replace nodes to an xml document via 
CreateTextNode:

xml = "<item>floogle</item>"
set newNode = oDom.createTextNode(xml)
call dDom.replaceChild( newNode, bloogleNode)

It works ok. But I can no longer find the new node in the document via an 
xpath query. When I save the doc to disk I can see the new node but its been 
escaped, presumably because it was a text node:

<root>
<item>wayheyhepahole</item>&lt;item&gt;floogle&lt;/item&gt;
</root>

I guess my question is: How do I get a "proper" xml node into an xml 
document via the above method?


TIA

bg





0
bg7423 (7)
2/17/2006 11:03:10 AM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
878 Views

Similar Articles

[PageSpeed] 33


bg wrote:


> using _vb6_: i'm trying to add/replace nodes to an xml document via 
> CreateTextNode:
> 
> xml = "<item>floogle</item>"
> set newNode = oDom.createTextNode(xml)

Sorry, createTextNode creates a text node so pass in the text content of 
the text node you want to have e.g.
   oDom.createTextNode("floogle")
If you want to create an item element node then use createElement
   Set Element = oDom.createElement("item")
   Element.appendChild oDom.createTextNode("floogle")

MSXML does not allow you to parse a snippet of XML markup into nodes 
unless you create a new XML DOM document and use its loadXML method.
-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1777)
2/17/2006 12:22:27 PM
cheers Martin 


0
bg7423 (7)
2/17/2006 1:49:55 PM
Reply:

Similar Artilces:

Saving a new quote before adding new quote products?
Hi all When creating a new quote, it has to be saved before new quote products (existing or write-in) can be added. Is there no other way to complete the quote form and save it all together at the end? The existing "save-step" is not really end user friendly. Anyone knows something more about this issue? Have fun :-) iStephan Quote products have a foreign key pointing to the quote, so it's not possible to save them before the quote itself is saved. As CRM is a web application, it's also not possible to create the quote and all quote details in one call - at least it ...

Report Header Lookup Question
I have a report running from a parameter query where a start and end date are entered and then the report opens within those dates. I want the report name to look something like this... Jobs Worked from ________ to _________. How would I make the dates entered in the parameter boxes populate to the header title? Any help is much appreciated. On Tue, 18 Mar 2008 15:29:00 -0700, Adam wrote: > I have a report running from a parameter query where a start and end date are > entered and then the report opens within those dates. I want the report name > to look something like t...

Link Question
Hello everyone! Using E02 on XP. Usually in the Access area and don't use Excel much but...always learn SO much in these Newsgroups. I have 2 folders in a shared drive that contain 2 versions of a file that need to be compared. (We send the ToClient file to our clients and they make changes to participant data for year end valuation work. They return it to us and we put it in the FromClient folder.) I've created a master file that will compare the two, cell by cell and, for now, just return "Ok" or "Edited". (Later I want to show the ToClient cell value...

Question about total cast basis calculation for an investment acco
I am using Money 2004 to track my mutual fund investments, among other things. I had the portfolio manager options set to show closed positions. When configured as such, the the cost basis from the closed positions was added into the total cost basis for the investment. In my case, the closed positions were a result of a non-taxable sell and reinvest into another investment. Long story short, some money shows up twice in the total cost basis calculation. After clearing the option to show closed positions, the total cost basis calculation appears to be correct. I would expect to see...

adding exchange account error
I have SBS2000 w exch2k sp3. I have 10 users using office 2000 with no problems. We received a corperate hand down pc last week with Win2k & office XP. When I try to setup the exchange mail account it gives me an error that it can not login to the exchange server. I am logged into the domain and my login script is running. I checked my DNS entries and they are to the 2K server. It can resolve the server name. Any help is appreciated. Hello, Please review the following article and check for RPC Binding Order and RPC ClientProtocols: 325930 XCCC: How to Troubleshoot Connectivity I...

formula question #27
I have an array of numbers like 100 0.01 200 0.015 300 0.02 400 0.025 500 0.03 say the range name is tab1 and an array of numbers like (call it tab2) 150 250 350 I want to look up the numbers from tab2 in tab1 and multilply it by the 2nd column from tab1 and add up the result. So, I want 150*.01+250*.015+350*.02 I tried as an array formula =sum((vlookup(tab2,tab1,2)*tab2) but this does not work. What should I be doing? TIA Say your tab2 info in col. A. In col. B type vlookup(A1,tab1!$A$1:$B$5,2,TRUE) Note: Use "true" in the vlookup, since your values in tab1 col. A and ...

I did a reset account of a computer account in AD which is an exchange server #2
How can I get the exchange to talk back to the AD again ... Thanks Andy ...

Set Print POS Receipt Question Default to NO
When you select the to Ask before printing POS receipt the system defaults to the YES box. Can this default be set to NO to allow you to just press ENTER? I have already set up a PRINTLASTRECEIPT button. ...

Report Writer Conditional Field Question
I should know the answer to this but my head is working on a different problem at the moment. In Report Writer, on a SOP Blank Invoice, I want to conditionally show the SOP_Line_Work_PrimaryShipToAddressCode ONLY when it is not equal to 'Primary' or 'Ship To'. In essence, I need to show the SOP Line Level Address when it's an outlier from their two standard address codes. I built a conditional field in RW that checks for Primary and returns blank ("") or the address. Works great. But now I need to add an OR condition and I'm stuck. I can't seem to be able...

Adding CRM users on an SBS2003 instance
I just installed CRM 3.0 on our instance of SBS2003. All of the documentation I've read thus far instructs me to use Active Directory to add new users. What about using SBS2003's built in "Server Management" app, will that work as well? I have a half a dozen existing users on the SBS server prior to installing CRM. Some have Exchange email boxes some do not. How do I go about adding them to CRM? I assume the ones with exchange email boxes will need to have one set up for them to fully participate in CRM. This is my FIRST ever CRM installation, so please be gentle if these are...

MSVAD audio stream question
Hello I am new in driver. I build msvad simple driver, but I have a question. Dose someone know can I get audio stream "original" (where the stream come from. ex. from which application or pid) ? Thanks ...

Exchange Migration : Consolidation of 2 AD domains in a new forest
I've done some research about this topic but there seems to be a lot of contradictory information posted on the web. Below I tried to describe the scenario and put some questions so that we could discuss here. Many thanks --------------------------------------------------- GOAL Migrate AD users (Windows 2003) and Exchange 2003 (2 servers in the same organization) from FORESTOLD to FORESTNEW REASON Need to consolidate 2 domains in one with a new name STEPS S1. Install Exchange in the new forest S2. Migrate users to the new forest - Use ADMT to move users - Set option to move sIDHis...

Drop down list question
I have a template with several drop down lists for the user to selec from. I would like it to function in a way that the user only needs t enter the first couple of numbers and the list will scroll to that par of the list. Is this possible ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Move your source cells for the list to directly above the validation cell, and then hide those cells. For example, if your source range is J1:J5, and the validation is in A10, move the...

Word 2007 question
How can I use a persons name listed in the address in the salution of a letter without copying? I've tried a bookmark but am unsuccessful so far. On Sun, 15 Nov 2009 16:14:01 -0800, DJ <DJ@discussions.microsoft.com> wrote: >How can I use a persons name listed in the address in the salution of a >letter without copying? I've tried a bookmark but am unsuccessful so far. See http://gregmaxey.mvps.org/Repeating_Data.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to th...

OWA question #12
i recently changed my domain name, example: from homedomain.com to workdomain.com. I have an exchange server with OWA enabled, i used to log in to OWA by typing the following https://homedomain.com/exchange. When I changed my domain i figured i would just logon to my OWA by typing https://workdomain.com. However this is not working, I have made sure that the new domain name points to the correct boxes, firewall shows that a request is coming in on port 443 and being sent to the correct internal host. My smtp virtual server is mapped to the correct ip, but still have not been able to lo...

Question about macro
Here is the case: Every week I will receive ten files(each has one work sheet) from my brokers. All the files are in the same format but different size. Is there a way to automatically collect the data from each file every week and put them all in one work sheet? The files name will change weekly(to accomodate the date) and so will the size. Thanks in advance. Jason ...

SendMessage Question/Problem
I have a dialog box with a toolbar subclassed in it that has a combo box. I have embedded the toolbar in a static control on the dialog box. When an item in the combo box is selected, I am getting the OnSelChange message being triggered in the subclassed tool bar class. I then get the item that was selected and call GetOwner()->SendMessage(WM_NOTIFY......) In the dialog box I have a ON_NOTIFY message command for the IDR_TOOLBAR. when I debug the OnSelChange method in the subclassed toolbar class, I can see it setting up the call, but when I place my cursor and do run to cursor in the O...

Adding argument description to custom functions
Hi does anyone knows how to add description to custom functions' arguments so that a description of each argument can be displayed in the formula palette? thanks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ VBA functions don't support text descriptions in the Function wizard. You can look at the information Laurent Longre has posted on his site about this: http://longre.free.fr/english/func_cats.htm Newer addin that supports this: http://longre.free.fr...

Currency accounting question
Hi There, I have exported data from Access 2002 to excel 2002 so i can change it and then import it into MYOB accounting. The problem is Access spits out the data like this (eg) 3909 when it should be $39.09 No matter what i format i try to use i end up with $3,909 or $3,909.00. Is there a simple formula i can use to change all my cells? I have about 500 to change and manually it would be a real pain!! Any help is greatly appreciated. Cheers and Thanks Mitch Mitch, You can divide all the values by 100 by entering 100 in some empty cell, then copy that cell, select the values to be divid...

Data Validation Question
I want to be able to create a drop-down list (which I know how to do), but I want an error message to appear when a certain value is selected. For instance, let's say my list contains 3 choices: yes no maybe Whenever "no" is selected, I want an error message to appear. I can't figure out how to make a drop-down list AND create a error box using data validation. Also, I want an error message to appear no matter what value is selected. Any help would be appreciated. Thanks. Data validation supports showing a message when the cell is selected and when an invalid entry is...

Mysterious question mark (?) when using OWA
Mysterious question mark (?) when using OWA It seems that my users whom use OWA to send email always seem to send along an "?" question mark at the beginning of their email messages. I am trying to find out why that is happening and how to go about eliminating it. If clients are XP SP2, check kba 883543 and apply the hotfix. Pe-XP SP2 clients: reinstall the S/MIME control from OWA - options. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------------- "Mr. Backup" <backup@yahoo.com> wrote in message new...

Format Question 10-01-07
How do I get this text box to format $#,###.## at the moment I am getting Grand Total:1085.5 instead of Grand Total $1,085.50 = "Grand Total:" & (NZ(DLookUp("Payable","qPayableTotalForPayment","OwnerID =" & tbOwnerID.Value),"")) Thanks for any Help...............Bob Simple method - in design view format the control as currency HTH -- Wayne Manchester, England. "Bob V" wrote: > > > How do I get this text box to format $#,###.## at the moment I am getting > Grand Total:1085.5 instead of Grand Total...

Access 2007 Licensing Question
We have started to use Access 2007 at work and I really like it. It seems incredibly powerful for a small price tag. In the IBM mainframe world, such a tool with similar functionality would cost hundreds of thousands of dollars. I used to work in this realm. I am having so much fun with Access 2007 at work, that I am considering buying a copy for my home PC to be able to experiment after hours and on weekends. (Sign of dedication, or sign of being a true geek? :-) I have an older Dell PC which works fine, but I plan to replace it at the end of 2010. If I buy Access 2...

Getting exception "The node to be inserted is from a different document context."
Hi, I've got the following piece of code that's causing me a bit of a problem XmlDocument doc = new XmlDocument (); XmlNode rootNode = doc.CreateNode (XmlNodeType.Element, "usersettings", null); User user = new User (userid); XmlNode rolesNode = user.GetRoles (); rootNode.AppendChild (rolesNode); : : The last line (rootNode.AppendChild (rolesNode)) throws an exception "The node to be inserted is from a different document context." How can I work around this? The code above is from a Web-service that collects various infor...

basic question re Calendar view
What's the difference between Day\Week\Month with AutoPreView and Day\Week\Month ? Thanks, DH With Autopreview when you hover over an appointment, you see additional = details. --=81 Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. =20 After furious head scratching, Dave Horne asked: | What's the difference between Day\Week\Month with AutoPreView and | Day\Week\Month ? |=20 | Thanks, DH MIlly, thanks for the reply. I must have tried 20 different appoin...