Hello Doug,
According to your description, what you need is to create a XML file which
includes multiple instances of Tag3. Please don't heisate to correct me if
I misunderstood anything here.
Which Technique are you using in application? XmlReader or XmlDocument?
I wrote a code snippet about how to achieved that by XmlDocument. If you
prefers XmlReader, please let me know. I will follow up.
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
System.Xml.XmlNode tag1 =
xd.CreateNode(System.Xml.XmlNodeType.Element, "tag1", null);
xd.AppendChild(tag1);
System.Xml.XmlNode tag2 =
xd.CreateNode(System.Xml.XmlNodeType.Element, "tag2", null);
tag1.AppendChild(tag2);
{
System.Xml.XmlNode tag3 =
xd.CreateNode(System.Xml.XmlNodeType.Element,"tag3",null);
System.Xml.XmlAttribute item = xd.CreateAttribute("item");
item.Value = "1";
tag3.Attributes.Append(item);
tag2.AppendChild(tag3);
}
{
System.Xml.XmlNode tag3 =
xd.CreateNode(System.Xml.XmlNodeType.Element, "tag3", null);
System.Xml.XmlAttribute item = xd.CreateAttribute("item");
item.Value = "2";
tag3.Attributes.Append(item);
tag2.AppendChild(tag3);
}
Hope this helps, please let me if you face any further issue. We are glad
to assist you.
Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
doug - 21 Sep 2007 15:08 GMT
I need to created the XML layout via client side proxyy class. I'm not
working with the XML dirtectly - but vua web service refererence to the
proxy. I'm using VB proxy classes.
I've done this before where each node is uniquely identifiable. Thisd time
<tag1> and <tag2> are unique and I just create variables objTag1 AS req.TAG1
and objTag2 AS req.TAG2. But tag3 occurs 1 to many times and has an
ITEM="nn" attribute that identifies it and makes it unique. I do not know
how to create instances of req.TAG3().
doug
> Hello Doug,
>
[quoted text clipped - 41 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
WenYuan Wang [MSFT] - 24 Sep 2007 12:31 GMT
Hello doug,
Thanks for your reply.
It seems this issue is related to Web Service and you are developing a VB
proxy class.
But I still have something unclear. Would you please clarify it for me?
1) What Web service does your application refer to? Is it an ASP.net Web
service?
2) Would you please give me a simple project to reproduce this issue on my
side? My alias is v-wywang@microsoft.com
I will perform further research after I got the reproduce project. I'm
waiting for your reply. It's my pleasure to assist you.
Have a great day.
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.