Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

I'm trying to append an Element after the

Customer Question
Hi I'm trying to...

Hi I'm trying to append an Element after the <dAndESampleIndicator> using DOM and vba. Im loading the xml from Access 2010.

Technician's Assistant: What application are you using?

Kinda of a novice...Here's the xml </includedEnrolleeItem>
<includedEnrolleeItem>
<includedEnrolleeID>22</includedEnrolleeID>
<uniqueEnrolleeId>xxxxxx</uniqueEnrolleeId>
<sourceSystemMemberId>C0021842201</sourceSystemMemberId>
<firstName>SampleFname</firstName>
<middleName/>
<lastName>SampleLname</lastName>
<suffix/>
<dateOfBirth>1971-xx-06</dateOfBirth>
<gender>M</gender>
<dAndESampleIndicator>Y</dAndESampleIndicator>
<planId>98905OK017003400</planId>
And here's what i want it to look like </includedEnrolleeItem>
<includedEnrolleeItem>
<includedEnrolleeID>22</includedEnrolleeID>
<uniqueEnrolleeId>xxxxxx</uniqueEnrolleeId>
<sourceSystemMemberId>C0021842201</sourceSystemMemberId>
<firstName>SampleFname</firstName>
<middleName/>
<lastName>SampleLname</lastName>
<suffix/>
<dateOfBirth>1971-xx-06</dateOfBirth>
<gender>M</gender>
<dAndESampleIndicator>Y</dAndESampleIndicator>
<dAndEValidationItem>
<planId>98905OK017003400</planId>

Technician's Assistant: Have you installed any updates recently?

No

Technician's Assistant: Anything else you want the Microsoft Office Expert to know before I connect you?

Nope thanks

Submitted: 7 months ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Answered in 7 hours by:
12/29/2017
Programmer: George Sibiya, Computer Hardware Engineer replied 7 months ago
George Sibiya
George Sibiya, Computer Hardware Engineer
Category: Programming
Satisfied Customers: 368
Experience: PhD in Computer Science
Verified

Hi,

Welcome to JustAnswer and thank you for utilizing our services

I'll help look at this and post back when ready.

Regards,

G

Ask Your Own Programming Question
Programmer: George Sibiya, Computer Hardware Engineer replied 7 months ago

Please test and comment on this one:

Sub CreateXML()
Dim node, attr
Dim xmlDoc As New DOMDocument
xmlDoc.async = False
xmlDoc.ResolveExternals = False
xmlDoc.preserveWhiteSpace = True

Set node = xmlDoc.createProcessingInstruction("xml", "version='1.0'")
xmlDoc.appendChild node
Set node = Nothing
Dim root
Set root = xmlDoc.createElement("includedEnrolleeItem")
xmlDoc.appendChild root

'Adding additional nodes
Set node = xmlDoc.createElement("includedEnrolleeID")
node.Text = "22"
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("uniqueEnrolleeId")
node.Text = "xxxxxx"
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("sourceSystemMemberId")
node.Text = "C0021842201"
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("firstName")
node.Text = "SampleFname"
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("middleName")
node.Text = ""
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("lastName")
node.Text = "SampleLname"
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("suffix")
node.Text = ""
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("dateOfBirth")
node.Text = "1971-xx-06"
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("gender")
node.Text = "M"
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("dAndESampleIndicator")
node.Text = "Y"
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("dAndEValidationItem")
node.Text = ""
root.appendChild node
Set node = Nothing

Set node = xmlDoc.createElement("planId")
node.Text = "98905OK017003400"
root.appendChild node
Set node = Nothing

'Display xml contents
MsgBox xmlDoc.XML

End Sub

Ask Your Own Programming Question
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a programmerLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask George Sibiya Your Own Question
George Sibiya
George Sibiya
George Sibiya, Computer Hardware Engineer
Category: Programming
Satisfied Customers: 368
368 Satisfied Customers
Experience: PhD in Computer Science

George Sibiya is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,175 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

848 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
Are there com objects that I can use to instantiate an instance
Are there com objects that I can use to instantiate an instance of chrome in Powershell? If not is there another way to automate chrome and does it have a document object model?… read more
Michael Hannigan
Michael Hannigan
Bachelor\u0027s Program
239 satisfied customers
I need a classic ASP page to parse an xml page to allow for
I need a classic ASP page to parse an xml page to allow for each element and any attributes to be listed. Scenario: A client will be using Ariba to submit PO orders to an asp page (.net page can be us… read more
Bryan
Bryan
735 satisfied customers
Using VBA I need a way to create a collection that has every
Using VBA I need a way to create a collection that has every element in the DOM tree, all the way to the last child on the last level. Lets say you have a dom tree that has a depth or number of genera… read more
John D
John D
Bachelor Degree in Engineering
342 satisfied customers
I am attempting to parse Data in XML Document to Excel
I am attempting to parse Data in XML Document to Excel Worksheet. This is my XML file for one customer data record: Cust1234 Smith New York MP3 Player Radio This well formed XML document feeds to Exce… read more
Steve Herrod
Steve Herrod
Senior Customer Care Engineer
Master\u0027s Degree
882 satisfied customers
Hi,I am relatively new to PHP. I have created a site that
Hi, I am relatively new to PHP. I have created a site that has a form (search form). And I want to add the results to a specific html div. The problem is the form is in a seperate div and we want to d… read more
MrWeb
MrWeb
46 satisfied customers
Hi, On the page I showed you earlier I have an XML document
Hi, On the page I showed you earlier I have an XML document that contains data which is displayed in HTML format on one of the pages. I need to enable authorized users to be able to add/edit data on t… read more
naqshi
naqshi
36 satisfied customers
1. The first step in implementing an AJAX solution is _____.
1. The first step in implementing an AJAX solution is _____. A) check if the server is available B) find out if the browser has enough resources to make the request C) to create an instance of the XML… read more
NeOh
NeOh
Software Engineer
Bachelor's Degree
682 satisfied customers
How can you hide or rename the Excel 2010 Batchstage menu (file
How can you hide or rename the Excel 2010 Batchstage menu (file menu) using VBA or the Ribbons XML? If that is not possible can you deactivate the tab? If we can't do any of the above, there is a drop… read more
John D
John D
Bachelor Degree in Engineering
342 satisfied customers
1. The first step in implementing an AJAX solution is _____. A)
1. The first step in implementing an AJAX solution is _____. A) check if the server is available B) find out if the browser has enough resources to make the request C) to create an instance of the XML… read more
Todd
Todd
Bachelor\u0027s Degree
396 satisfied customers
1. The first step in implementing an AJAX solution is _____.
This is for Todd 1. The first step in implementing an AJAX solution is _____. A) check if the server is available B) find out if the browser has enough resources to make the request C) to create an in… read more
NeOh
NeOh
Software Engineer
Bachelor's Degree
682 satisfied customers
1. The first step in implementing an AJAX solution is _____. A)
1. The first step in implementing an AJAX solution is _____. A) check if the server is available B) find out if the browser has enough resources to make the request C) to create an instance of the XML… read more
Todd
Todd
Bachelor\u0027s Degree
396 satisfied customers
1. The first step in implementing an AJAX solution is _____.
1. The first step in implementing an AJAX solution is _____. A) check if the server is available B) find out if the browser has enough resources to make the request C) to create an instance of the XML… read more
Todd
Todd
Bachelor\u0027s Degree
396 satisfied customers
How can I save one tab of a multi-tab workbook as an xml file
How can I save one tab of a multi-tab workbook as an xml file using VBA in Access? When I try to saving Excel as xml using Access vba, I get the whole spreadsheet. I only need on page/tab.… read more
John D
John D
Bachelor Degree in Engineering
342 satisfied customers
The first step in implementing an AJAX solution is _____. A)
The first step in implementing an AJAX solution is _____. A) check if the server is available B) find out if the browser has enough resources to make the request C) to create an instance of the XMLHtt… read more
Todd
Todd
Bachelor\u0027s Degree
396 satisfied customers
I need to read HTML source for specific URLs. Is there an
I need to read HTML source for specific URL's. Is there an DOM object attribute which exposes the source. I have tried to use the Microsoft Internet Transfer control (INET), But I cannot achieve insta… read more
Russell H.
Russell H.
Computer Technology Consultant
Vocational, Technical or Trade Scho
791 satisfied customers
For Todd 1. The first step in implementing an AJAX solution
For Todd: 1. The first step in implementing an AJAX solution is _____. A) check if the server is available B) find out if the browser has enough resources to make the request C) to create an instance … read more
Todd
Todd
Bachelor\u0027s Degree
396 satisfied customers
i have a wordpress blog and i can not get my rss feed to valadate.I
i have a wordpress blog and i can not get my rss feed to valadate.I get alot of differnt messages… read more
zerohex
zerohex
Life experience
20 satisfied customers
Requirements 1. XML File specification - xx to finalise,
Requirements: 1. XML File specification - xx to finalise, but this may grow over the term of the project. 2. Template file for external HTML content to be shown in 'reviews' and 'case studies' 3. AS3 … read more
ehabtutor
ehabtutor
Computer Software Engineer
Bachelor's Degree
936 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x