Click here to Skip to main content
15,867,686 members
Home / Discussions / XML / XSL
   

XML / XSL

 
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
AnswerRe: How limitate the attribute of the root to it? Pin
dasblinkenlight9-Mar-11 2:20
dasblinkenlight9-Mar-11 2:20 
QuestionIs Serialization worth it? Pin
Ger Hayden21-Feb-11 23:47
Ger Hayden21-Feb-11 23:47 
Questiongenerate xml based on schema. Pin
Ramkumar_S16-Feb-11 15:33
Ramkumar_S16-Feb-11 15:33 
AnswerRe: generate xml based on schema. Pin
Ger Hayden22-Feb-11 0:04
Ger Hayden22-Feb-11 0:04 
QuestionCustomizing RSS Feed - XSL to display rss your way. Pin
Sparx200914-Feb-11 2:36
Sparx200914-Feb-11 2:36 
AnswerRe: Customizing RSS Feed - XSL to display rss your way. Pin
Ravi Sant16-Feb-11 4:09
Ravi Sant16-Feb-11 4:09 
QuestionConverting some RTF text to WordML Pin
Ravi Sant8-Feb-11 19:55
Ravi Sant8-Feb-11 19:55 
QuestionHelp editing Xml file in C# Pin
jadughar3-Feb-11 21:32
jadughar3-Feb-11 21:32 
AnswerRe: Help editing Xml file in C# Pin
Xmen Real 3-Feb-11 22:03
professional Xmen Real 3-Feb-11 22:03 
GeneralRe: Help editing Xml file in C# Pin
jadughar3-Feb-11 22:38
jadughar3-Feb-11 22:38 
GeneralRe: Help editing Xml file in C# Pin
Xmen Real 3-Feb-11 22:41
professional Xmen Real 3-Feb-11 22:41 
GeneralRe: Help editing Xml file in C# Pin
jadughar3-Feb-11 22:57
jadughar3-Feb-11 22:57 
QuestionBehavior of '+' operator for String in XSL Pin
itsaswath29-Jan-11 6:48
itsaswath29-Jan-11 6:48 
QuestionSilverlight XSD and datatable Pin
Mycroft Holmes17-Jan-11 21:46
professionalMycroft Holmes17-Jan-11 21:46 
GeneralXSL Drop Down Pin
manowj24-Dec-10 21:46
manowj24-Dec-10 21:46 
QuestionHow to deserialize this one Pin
igalep13219-Dec-10 19:12
igalep13219-Dec-10 19:12 
QuestionSaving a word document(2000 to 2010) to xml Pin
Haim Nachum10-Dec-10 6:13
Haim Nachum10-Dec-10 6:13 

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.