![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a situation where a provider is using C# code to demonstrate XML method requirements. In this case we have several elements, the first of which states "array of selected items." This looks like the below text in SOAP XML: SOAP.XML:= '<in1>' SOAP.XML:= '<string>2223</string>' SOAP.XML:= '<string>2216</string>' SOAP.XML:= '<string>2217</string>' SOAP.XML:= '<string>11899</string>' SOAP.XML:= '</in1>' But then the next element specifies "array of arrays" to provide several categories per item. So I need to generate XML to represent several categories for each of the above items (2223, 2216, 2217, 11899). I could guess that one element might look like: string>2223</string><cat1>C001</cat1><cat2>C002</cat2> etc, but I don't know if this is kosher. Does anyone recognize this issue? Can you tell me how to structure a "multivalued" XML array? Thanks! Ed |
#3
| |||
| |||
|
|
Update: The category section is 'in1' to that implies a separate section. So perhaps I just match the positions in in0 to in1? Ed "Ed Sheehan" <NOedsSPAM (AT) xmission (DOT) com> wrote in message news:hqpp3v$pi6$1 (AT) news (DOT) xmission.com... I have a situation where a provider is using C# code to demonstrate XML method requirements. In this case we have several elements, the first of which states "array of selected items." This looks like the below text in SOAP XML: SOAP.XML:= '<in1>' SOAP.XML:= '<string>2223</string>' SOAP.XML:= '<string>2216</string>' SOAP.XML:= '<string>2217</string>' SOAP.XML:= '<string>11899</string>' SOAP.XML:= '</in1>' But then the next element specifies "array of arrays" to provide several categories per item. So I need to generate XML to represent several categories for each of the above items (2223, 2216, 2217, 11899). I could guess that one element might look like: string>2223</string><cat1>C001</cat1><cat2>C002</cat2> etc, but I don't know if this is kosher. Does anyone recognize this issue? Can you tell me how to structure a "multivalued" XML array? Thanks! Ed |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Not 100% sure what you are trying to achieve, but I think what you are after is: in1 string name>2223</name categories category>C001</category category>C002</category /categories /string string name>2216</name categories category>C002</category category>C015</category /categories /string /in1 array of arrays is created by a tag set with a tag set inside that repeats. The outer tag set doesn't contain a value itself, but a tag with the value inside of it (i.e. <name>). Marshall |
#6
| |||
| |||
|
|
Not 100% sure what you are trying to achieve, but I think what you are after is: in1 string name>2223</name categories category>C001</category category>C002</category /categories /string string name>2216</name categories category>C002</category category>C015</category /categories /string /in1 array of arrays is created by a tag set with a tag set inside that repeats. The outer tag set doesn't contain a value itself, but a tag with the value inside of it (i.e. <name>). Marshall |
#7
| |||
| |||
|
|
But then the next element specifies "array of arrays" to provide several categories per item. |
#8
| |||
| |||
|
|
But then the next element specifies "array of arrays" to provide several categories per item. |
#9
| |||
| |||
|
|
Would it mnake sense to do it this way? I'm just trying to fit in the in0 and in1 labels since they are used to represent items and categories. in0 * * <string>2223</string * * <in1 * * * * <string>C001</string * * * * <string>C002</string * * </in1 * * <string>2216</string * * <in1 * * * * <string>C002</string * * * * <string>C015</string * * </in1 /in0 |
#10
| |||
| |||
|
|
Would it mnake sense to do it this way? I'm just trying to fit in the in0 and in1 labels since they are used to represent items and categories. in0 string>2223</string in1 string>C001</string string>C002</string /in1 string>2216</string in1 string>C002</string string>C015</string /in1 /in0 |
![]() |
| Thread Tools | |
| Display Modes | |
| |