Solved

XML question about oxml.appendChild - Using Classic ASP.

Posted on 2006-10-20
1
265 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Out the count variables 6 52
classic asp checkbox uncheck and check 2 56
Using Classic ASP inside HTML pages 2 55
Error in query expression 3 30
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
A short film showing how OnPage and Connectwise integration works.

947 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now