Click here to Skip to main content
15,885,757 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Convert a string to unicode Pin
Luc Pattyn16-Jun-09 23:10
sitebuilderLuc Pattyn16-Jun-09 23:10 
Questionxml root Pin
Ebube16-Jun-09 2:43
Ebube16-Jun-09 2:43 
AnswerRe: xml root Pin
EliottA16-Jun-09 2:52
EliottA16-Jun-09 2:52 
GeneralRe: xml root Pin
Luc Pattyn16-Jun-09 3:49
sitebuilderLuc Pattyn16-Jun-09 3:49 
GeneralRe: xml root Pin
Ebube16-Jun-09 5:23
Ebube16-Jun-09 5:23 
GeneralRe: xml root Pin
The Man from U.N.C.L.E.16-Jun-09 7:29
The Man from U.N.C.L.E.16-Jun-09 7:29 
GeneralRe: xml root Pin
Ebube16-Jun-09 23:56
Ebube16-Jun-09 23:56 
GeneralRe: xml root Pin
The Man from U.N.C.L.E.17-Jun-09 1:07
The Man from U.N.C.L.E.17-Jun-09 1:07 
You must have a typo somewhere.

Here is the full code snippet, as based on your code. It works and generates the output you require.

Dim doc As New System.Xml.XmlDocument()

Dim declarationNode As System.Xml.XmlNode = doc.CreateXmlDeclaration("1.0", "", "")
doc.AppendChild(declarationNode)

Dim reportNode As System.Xml.XmlNode = doc.CreateElement("PENCOM_REPORT")

Dim att As System.Xml.XmlAttribute = doc.CreateAttribute("xmlns:xsi")
att.Value = "http://www.w3.org/2001/XMLSchema-instance"
reportNode.Attributes.Append(att)

Dim att1 As System.Xml.XmlAttribute = doc.CreateAttribute("xsi:noNamespaceSchemaLocation", "http://www.w3.org/2001/XMLSchema-instance")
att1.Value = "SCHEMA_010.xsd"
reportNode.Attributes.Append(att1)

doc.AppendChild(reportNode)

Dim XMLOutput As String = doc.OuterXml


Resulting string XMLOutput is
<?xml version="1.0"?><PENCOM_REPORT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SCHEMA_010.xsd" />


If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk

GeneralRe: xml root Pin
Ebube17-Jun-09 2:29
Ebube17-Jun-09 2:29 
QuestionRe: xml root Pin
The Man from U.N.C.L.E.17-Jun-09 4:01
The Man from U.N.C.L.E.17-Jun-09 4:01 
AnswerRe: xml root Pin
Ebube17-Jun-09 6:12
Ebube17-Jun-09 6:12 
Questionhow to beat around shutdown –a Pin
RK11@200915-Jun-09 20:58
RK11@200915-Jun-09 20:58 
AnswerRe: how to beat around shutdown –a Pin
Mithun.Shitole15-Jun-09 21:08
Mithun.Shitole15-Jun-09 21:08 
GeneralRe: how to beat around shutdown –a Pin
RK11@200915-Jun-09 22:26
RK11@200915-Jun-09 22:26 
AnswerRe: how to beat around shutdown –a Pin
Mithun.Shitole15-Jun-09 22:52
Mithun.Shitole15-Jun-09 22:52 
GeneralRe: how to beat around shutdown –a Pin
RK11@200916-Jun-09 1:26
RK11@200916-Jun-09 1:26 
GeneralRe: how to beat around shutdown –a Pin
Mithun.Shitole16-Jun-09 1:34
Mithun.Shitole16-Jun-09 1:34 
GeneralRe: how to beat around shutdown –a Pin
RK11@200916-Jun-09 1:42
RK11@200916-Jun-09 1:42 
GeneralRe: how to beat around shutdown –a Pin
Dave Kreskowiak16-Jun-09 2:05
mveDave Kreskowiak16-Jun-09 2:05 
GeneralRe: how to beat around shutdown –a Pin
RK11@200916-Jun-09 2:21
RK11@200916-Jun-09 2:21 
GeneralRe: how to beat around shutdown –a Pin
EliottA16-Jun-09 2:52
EliottA16-Jun-09 2:52 
GeneralRe: how to beat around shutdown –a Pin
Dave Kreskowiak16-Jun-09 4:08
mveDave Kreskowiak16-Jun-09 4:08 
AnswerRe: how to beat around shutdown –a Pin
Mithun.Shitole16-Jun-09 18:54
Mithun.Shitole16-Jun-09 18:54 
GeneralRe: how to beat around shutdown –a Pin
Dave Kreskowiak17-Jun-09 1:29
mveDave Kreskowiak17-Jun-09 1:29 
GeneralRe: how to beat around shutdown –a Pin
Mithun.Shitole17-Jun-09 1:45
Mithun.Shitole17-Jun-09 1:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.