473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problems with createProcessingInstruction()

I know the object XMLDocument of .NET is different, by maybe you can help me
anyway.
I'm using VB6 and MSXML3. I create a XML file using the XML DOM but I have a
problem with the createProcessingInstruction() function, because I need to
specify that the file is encoded with UTF-8 encoding. My code is very
simple:

Dim pi As IXMLDOMProcessingInstruction
Set pi = doc.createProcessingInstruction("xml", "version=""1.0""
encoding=""UTF-8""")
Call doc.appendChild(pi)

Now, after this call, the pi.Text value is

version="1.0" encoding="UTF-8"

but the pi.xml property value is

<?xml version="1.0"?>

Why? I tried with UTF-16 encoding, and it works fine...is UTF-8 the default,
so MSXML ignores my specification? Anyway, I need to specify the encoding,
as the program that is supposed to read the XML file won't be able to parse
the file correctly without that.

Thank you in advance for your help

Sebastiano
Nov 12 '05 #1
0 1003

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Shawn | last post by:
Hi. I'm using XMLDOM to write xml to the browser, but it won't display the encoding I've specified. This is the code I'm using: Set objPI = xmlDoc.createProcessingInstruction("xml",...
3
by: Lars Moastuen | last post by:
I'm currently writing a webservice. I've successfully written a service that gives me some XML data, but now I want to link a XLS-stylesheet to that data. The way I'm trying to do that is to...
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
2
by: Stacey Levine | last post by:
OK.. I am creating an XML document (Fedex Tracking). And one of my attributes on an element is supposed to have an "xsi:" before the attribute name. It is in my code below.. but the output does not...
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.