Creating additional lines
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Creating additional lines




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Creating additional lines  
Fred


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-22-05 07:48 AM

I have an xml file that looks like this
<xml>
<record id="1">
<field1>data1</field1>
<field2>data1</field2>
</record>
<record id="2">
<field1>data2</field1>
<field2>data1</field2>
</record>
<record id="3">
<field1>data3</field1>
<field2>data3</field2>
</record>
</xml>

my output needs to be this
<xml>
<record id="1">
<field1>data1</field1>
<field2>data1</field2>
</record>
<record id="2">
<field1>data2</field1>
<field2>data1</field2>
</record>
<record id="2">
<field1>data2</field1>
<field2>data1</field2>
</record>
<record id="3">
<field1>data3</field1>
<field2>data3</field2>
</record>
</xml>


I need to ADD a record to the already existing records, how do I do that?

Thanks







[ Post a follow-up to this message ]



    Re: Creating additional lines  
esuyer@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-05 01:58 AM

you'll need a .net type i.e.

class RecordHelper {
public void AddRecord( TypedXmlDoc recordDoc, int recordid, string
field1, string field2 ) {

XmlDocument d = recordDoc.OwnerDocument;
XmlElement e = d.CreateElement("Record");

XmlAttribute _a = d.CreateAttribute("Id");
_a.InnerText = recordid.tostring();
e.Attributes.Append(_a);

XmlAttribute _a = d.CreateAttribute("field1");
_a.InnerText = field1;
e.Attributes.Append(_a);

XmlAttribute _a = d.CreateAttribute("field2");
_a.InnerText = field2;
e.Attributes.Append(_a);

recordDoc.AppendChild(e);
}
}


HTH






[ Post a follow-up to this message ]



    Re: Creating additional lines  
Fred


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-05 01:58 AM

TypedXmlDoc is not in existance, am I misssing something?
<esuyer@gmail.com> wrote in message
news:1127415526.657959.188680@z14g2000cwz.googlegroups.com...
> you'll need a .net type i.e.
>
> class RecordHelper {
> public void AddRecord( TypedXmlDoc recordDoc, int recordid, string
> field1, string field2 ) {
>
> XmlDocument d = recordDoc.OwnerDocument;
> XmlElement e = d.CreateElement("Record");
>
> XmlAttribute _a = d.CreateAttribute("Id");
> _a.InnerText = recordid.tostring();
> e.Attributes.Append(_a);
>
> XmlAttribute _a = d.CreateAttribute("field1");
> _a.InnerText = field1;
> e.Attributes.Append(_a);
>
> XmlAttribute _a = d.CreateAttribute("field2");
> _a.InnerText = field2;
> e.Attributes.Append(_a);
>
> recordDoc.AppendChild(e);
> }
> }
>
>
> HTH
>







[ Post a follow-up to this message ]



    Re: Creating additional lines  
esuyer@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-05 10:52 PM

Hi Fred,

Are you trying to insert a node from within the rules engine or an
orchestration or elsewhere?

The Microsoft.RulesEngine.dll or Microsoft.RulesEngine.Extensions.dll
has a TypedXmlDocument type.  If you're adding a node from within the
rules engine, you'll need to use this type.






[ Post a follow-up to this message ]



    Re: Creating additional lines  
Fred


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-28-05 07:49 AM

I am trying to insert this inside of the map.

Sorry for the delay...


<esuyer@gmail.com> wrote in message
news:1127487120.665223.170910@g47g2000cwa.googlegroups.com...
> Hi Fred,
>
> Are you trying to insert a node from within the rules engine or an
> orchestration or elsewhere?
>
> The Microsoft.RulesEngine.dll or Microsoft.RulesEngine.Extensions.dll
> has a TypedXmlDocument type.  If you're adding a node from within the
> rules engine, you'll need to use this type.
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:39 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register