I am not sure what it is you are trying to do. Resource
properties can be used to represent either simple or complex content. The
example you have shown is complex. You can think of the XML as representing the
following class:
Comment {
int commentId =
1;
string userName =
"Lombrera";
}
You can use Muse to (de)serialize complex types just as you
can simple types. I do not recommend treating the complex content as a simple
string and treating the value of Comment as you suggest - this makes the
handling of that value very difficult in your code.
You mention attributes, but I am not sure if you are
talking about XML attributes or not. Another way to serialize your Comment
structure is as follows:
<Comment commentId="1"
userName="Lombrera"/>
Now the values are serialized as XML attributes, but
Comment is still a complexType since it has attributes. Ultimately you will want
to treat this as a complexType in your code.
There may be an example of MUWS metrics in the Muse project
- I will let someone more knowledgeable about the code speak to that. A MUWS
metric is a complex property that might serve as an example for modeling
Comment.
Bryan
From: Lombrera Lombrera [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 20, 2005 11:45 AM
To: [email protected]
Subject: how to attribute xml to a value of a propertie
Hi all,
Well, I would like to attribute some xml elements to the value of a propertie inside .soap requests.
For example, in a SetPropertie request:
<wsrp:Update>
<fs:Comment><record><commentId>1</commentId><userName>Lombrera</userName></record></fs:Comment>
</wsrp:Update>
So, the value of the propertie called Comment would be:
Commnet = "<commentId>1</commentId><userName>Lombrera</userName>"
Of course this does not work unless I use <!-- my xml elements -->. My doubt is if there is a more elegant way to do this?
Thanks you all guys.
Lombrera
Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora!
