Click here to Skip to main content
15,914,413 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRSS Feed not displaying properly Pin
AAntix7-Jan-04 8:02
AAntix7-Jan-04 8:02 
QuestionXSLT of data extracted via XPath? Pin
AndrewCherry3-Jan-04 17:01
AndrewCherry3-Jan-04 17:01 
AnswerRe: XSLT of data extracted via XPath? Pin
avnrao4-Jan-04 23:37
avnrao4-Jan-04 23:37 
Generalxml transform Pin
samo7a2-Jan-04 11:10
samo7a2-Jan-04 11:10 
GeneralRe: xml transform Pin
Heath Stewart2-Jan-04 11:51
protectorHeath Stewart2-Jan-04 11:51 
GeneralSerializing web server controls Pin
Rafik2-Jan-04 10:33
Rafik2-Jan-04 10:33 
GeneralRe: Serializing web server controls Pin
Heath Stewart2-Jan-04 11:49
protectorHeath Stewart2-Jan-04 11:49 
GeneralSerializing Arrays in .NET Pin
mohn331031-Dec-03 15:07
mohn331031-Dec-03 15:07 
Hi,

I'm serializing an array of objects using XML Serialization. Using attributes you can customize what the xml element names will be. If you serialize an array, the root name is prefixed with "ArrayOf". How do you change that? I tried using the [XmlArray( Elementname = "SomethingElse") ] attribute on the array, but it didn't seem to work.

I've seen examples where they use the "XmlRoot" attribute on the class name. But I'm serializing JUST the array, NOT a class. So I can't use that.

Basically here's what I have...

I have

MyType[] myArray;

and I want to serialize that...

XmlSerializer xs = new XmlSerialize( typeof( MyType[] ) );
xs.Serialize( fileStream, myArray );

I get...


<arrayofmytype>
<mytype>...
<mytype>...


Is there anyway to change <arrayofmytype> to something else?

Thanks.
GeneralRe: Serializing Arrays in .NET Pin
mohn331031-Dec-03 15:09
mohn331031-Dec-03 15:09 
GeneralRe: Serializing Arrays in .NET Pin
Heath Stewart2-Jan-04 11:44
protectorHeath Stewart2-Jan-04 11:44 
GeneralRe: Serializing Arrays in .NET Pin
mohn33102-Jan-04 14:16
mohn33102-Jan-04 14:16 
GeneralRe: Serializing Arrays in .NET Pin
Heath Stewart2-Jan-04 19:44
protectorHeath Stewart2-Jan-04 19:44 
Generalextract data from xml document Pin
samo7a30-Dec-03 11:06
samo7a30-Dec-03 11:06 
GeneralRe: extract data from xml document Pin
Nick Parker2-Jan-04 6:55
protectorNick Parker2-Jan-04 6:55 
GeneralProblem with transformation result Pin
tamekyle30-Dec-03 9:09
tamekyle30-Dec-03 9:09 
GeneralRe: Problem with transformation result Pin
Heath Stewart31-Dec-03 11:23
protectorHeath Stewart31-Dec-03 11:23 
GeneralRe: Problem with transformation result Pin
tamekyle2-Jan-04 4:15
tamekyle2-Jan-04 4:15 
Generalxmslt templates Pin
aynka200029-Dec-03 1:53
aynka200029-Dec-03 1:53 
QuestionHow to use array update the xml file?&#9608;&#9608;&#9608; Pin
nichen100128-Dec-03 13:42
nichen100128-Dec-03 13:42 
AnswerRe: How to use array update the xml file?&amp;#9608;&amp;#9608;&amp;#9608; Pin
Philip Fitzsimons6-Jan-04 3:02
Philip Fitzsimons6-Jan-04 3:02 
GeneralProblem adding web reference to Visual c++ application Pin
Anonymous27-Dec-03 9:52
Anonymous27-Dec-03 9:52 
GeneralRe: Problem adding web reference to Visual c++ application Pin
Anonymous27-Dec-03 9:57
Anonymous27-Dec-03 9:57 
Generalcrystal reports Pin
heba_zien27-Dec-03 9:34
heba_zien27-Dec-03 9:34 
GeneralProper Installation of MSXML Pin
Heath Stewart23-Dec-03 4:52
protectorHeath Stewart23-Dec-03 4:52 
GeneralXSD Pin
Large Data File22-Dec-03 7:30
Large Data File22-Dec-03 7:30 

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.