Click here to Skip to main content
15,904,416 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionLoop over chars in a string Pin
KenBonny1-Jun-11 1:58
KenBonny1-Jun-11 1:58 
AnswerRe: Loop over chars in a string [modified] Pin
George L. Jackson7-Jun-11 10:27
George L. Jackson7-Jun-11 10:27 
QuestionGetting XML content Pin
stevenykl31-May-11 19:43
stevenykl31-May-11 19:43 
AnswerRe: Getting XML content Pin
Erik Molenaar31-May-11 22:30
Erik Molenaar31-May-11 22:30 
GeneralRe: Getting XML content Pin
stevenykl1-Jun-11 0:21
stevenykl1-Jun-11 0:21 
QuestionHelp to write Xquery Pin
Neno9930-Apr-11 3:37
Neno9930-Apr-11 3:37 
AnswerRe: Help to write Xquery Pin
jschell30-Apr-11 12:57
jschell30-Apr-11 12:57 
GeneralRe: Help to write Xquery Pin
Neno993-May-11 16:07
Neno993-May-11 16:07 
GeneralRe: Help to write Xquery Pin
Richard MacCutchan3-May-11 21:58
mveRichard MacCutchan3-May-11 21:58 
GeneralRe: Help to write Xquery Pin
jschell4-May-11 8:47
jschell4-May-11 8:47 
QuestionHow to bind the data into a class object from a list. Pin
Rocky2329-Apr-11 0:57
Rocky2329-Apr-11 0:57 
AnswerRe: How to bind the data into a class object from a list. Pin
jschell29-Apr-11 9:47
jschell29-Apr-11 9:47 
QuestionXML Search Pin
DJ24526-Apr-11 20:49
DJ24526-Apr-11 20:49 
AnswerRe: XML Search Pin
GregStevens6-Jul-11 15:43
GregStevens6-Jul-11 15:43 
QuestionXpath syntax. Pin
Mel Padden4-Apr-11 22:34
Mel Padden4-Apr-11 22:34 
AnswerRe: Xpath syntax. Pin
Tarun.K.S4-Apr-11 23:40
Tarun.K.S4-Apr-11 23:40 
GeneralRe: Xpath syntax. Pin
Mel Padden5-Apr-11 0:06
Mel Padden5-Apr-11 0:06 
QuestionHelp to make condition in xsd file Pin
MrKBA30-Mar-11 22:41
MrKBA30-Mar-11 22:41 
AnswerRe: Help to make condition in xsd file Pin
RugbyLeague19-Apr-11 2:26
RugbyLeague19-Apr-11 2:26 
Questionattribute restriction [modified] [Solved] Pin
V.24-Mar-11 22:40
professionalV.24-Mar-11 22:40 
QuestionVisual Studio's XSD vs Liquid Technologies Code Generator Pin
Ger Hayden16-Mar-11 4:40
Ger Hayden16-Mar-11 4:40 
Questionusing search web service Pin
ekaup11-Mar-11 23:36
ekaup11-Mar-11 23:36 
AnswerRe: using search web service Pin
jschell13-Mar-11 10:16
jschell13-Mar-11 10:16 
GeneralRe: using search web service Pin
ekaup13-Mar-11 12:22
ekaup13-Mar-11 12:22 
QuestionHow limitate the attribute of the root to it? Pin
Pierre besquent24-Feb-11 22:06
Pierre besquent24-Feb-11 22:06 
Hi,
I have this code to generate xml file;
XmlTextWriter				myXmlTextWriter = new XmlTextWriter ("D:/New Folder/MyXmlff.xml",System.Text.Encoding.UTF8);
		      myXmlTextWriter.Formatting = Formatting.Indented;
			  myXmlTextWriter.WriteStartDocument(false);
			  myXmlTextWriter.WriteStartElement("root");
			  myXmlTextWriter.WriteAttributeString("xmlns","urn:iso:std:iso:20022:tech:xsd:pain.001.001.02"); 
			  myXmlTextWriter.WriteStartElement("pain.001.001.02");
                          myXmlTextWriter.WriteComment("Section A : Group Header");
		          myXmlTextWriter.WriteStartElement("GrpHdr");
		          myXmlTextWriter.WriteStartElement("MsgId");
myXmlTextWriter.Flush();
            myXmlTextWriter.WriteEndElement();
            myXmlTextWriter.WriteEndElement();
			myXmlTextWriter.Close();

the problem is the attribute of the root appears always in other tags like this:

<root xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">
<pain.001.001.02>
<salarié xmlns="A01">

<grphdr>
<msgid>
<credttm xmlns="25/02/2011 04:50:31">
<btchbookg xmlns="True">
<nboftxs xmlns="1">
<ctrlsum xmlns="100">
<grpg>
<initgpty>
</Salarié>
</pain.001.001.02>
</root>
but i want that xmlns appears ONLY as an attribute of the root like this:

<document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">

<pain.001.001.02>

<grphdr>

<msgid>FVIR/101230/1

<credttm>2010-12-30T17:02:21

thank u for u help
hugs
<btchbookg>false

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.