Simple XML Serialization question

G

Guest

Hi.
I'm using XML Serialization in my app, but have one tiny problem:
I've declared a string with the [XMLElement].
So then I get the string when tje XML looks like this:
<item>
<price currensy="USD">10</price>
<item>
But now I want to add a attribute to this
How do I use
 
G

Guest

a litle problem when maikng the last post, sorry.
Here is the right one:
I'm using XML Serialization in my app, but have one tiny problem:
I've declared a string with the [XMLElement].
So then I get the string when tje XML looks like this:
<item>
<price currensy="USD">10</price>
<item>

But i now want to add an attribute, like this:
<item>
<price currensy="USD">10</price>
<item>
I'd like to just define this attriute (as a string) in the main class,
without the need of making a new "price" class/struct
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top