Solved

XML question about oxml.appendChild - Using Classic ASP.

Posted on 2006-10-20
1
270 Views
Last Modified: 2008-03-06
I have a question about creating an XML file.  How can I add some text to a XML element.  For example, I am currently creating and element named - <BillingData> but I want to really create this instead
<BillingData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://apogee.net/WebService">


Here is what i am producing now:

 <?xml version="1.0" ?>
- <BillingData>                    
  <BillingCycleData />
 - <UtilityId id="0">
  <meterReadDate>200509</meterReadDate>
  <revenue>118.94</revenue>
  <usuage>1208</usuage>
  </UtilityId>
  </BillingData>

Here is my code that create the BillingData element.

' create xml  
 oXML.appendChild(oXML.createProcessingInstruction("xml","version=""1.0"""))  
 oXML.appendChild(oXML.createElement("BillingData")    ????? can text be added to this statement

I want to create the BillingData so it looks like this:  

<BillingData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://apogee.net/WebService">
 
0
Comment
Question by:Hojoformo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 58

Accepted Solution

by:
amit_g earned 500 total points
ID: 17776128
oXML.appendChild(oXML.createProcessingInstruction("xml","version=""1.0"""))  
Set oChild = oXML.appendChild(oXML.createElement("BillingData"))
oChild.setAttribute "xmlns:xsd", "http://www.w3.org/2001/XMLSchema"
oChild.setAttribute "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"
oChild.setAttribute "xmlns", "http://apogee.net/WebService"
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question