SAP PI 7.1. Splitting XMl file after 998 rows.

I need to split the XML file for FI interface after 998 rows. How I can use File content conversion with XML file at sender adapter?
Please suggest me a solution.

Hi Nirman,
If it is an XML file then you need to handle that in mapping. Below is the sample code.
int count  = 0;
int count1  = 0;
for(int j = 0; j< a.length; j++)
     count  = count + 1;
     count1 = count1+ 1;
     result.addValue(a[j]);
     if (count == 998)
//     if (count == var998)
          if (a.length - count1==0)
                    count = 0;
          else
                    result.addContextChange();
                    count = 0;

Similar Messages

  • Loading xml file with multiple rows

    I am loading data from xml files using xsl for transformation. I have created xsl's and loaded some of the data. In an xml file with multiple row, it's only loading one (the first) row. Any idea how I can get it to read and load all the records in the file???

    Could some please help me with the above. I desparately need to move forward.

  • XI have to break/split XML-File into N times a XML Message

    Hello,
    Can anyone help with this one. I guess this is not an easy exercise but I need to solve it urgently.
    XI gets a XML-file from a system.
    This file has N times a element <XBT>.
    Every time XI gets such a file the number of <XBT> is different.
    XI haves to break this xml into N xml messages according to element ><XBT> in order to send them to Sap sequentially.
    For example the following XML file have to split up into 2 xml files (the elements XBT occurs 2 times)
    How can this be done?
    <mt_BubaBestand>
    <b><XBT></b>
      <Algemeen>
         <Verkooporganisatie>5000</Verkooporganisatie>
         <Distributiekanaal>50</Distributiekanaal>
         <Productgroep>50</Productgroep>
         <Ordernummer>123123</Ordernummer>
         <Verkoopgroep/>
         <Documentdatum>20061207</Documentdatum>
         <Medewerker_nr>e60217</Medewerker_nr>
         <Medewerker_naam>Hermans</Medewerker_naam>
         <CRM_nr/>
         <CIFDedicated/>
         <Klantgroep/>
      </Algemeen>
    <b></XBT></b>
    <b><XBT></b>
      <Algemeen>
         <Verkooporganisatie>5000</Verkooporganisatie>
         <Distributiekanaal>50</Distributiekanaal>
         <Productgroep>50</Productgroep>
         <Ordernummer>123123</Ordernummer>
         <Verkoopgroep/>
         <Documentdatum>20061207</Documentdatum>
         <Medewerker_nr>e60217</Medewerker_nr>
         <Medewerker_naam>Hermans</Medewerker_naam>
         <CRM_nr/>
         <CIFDedicated/>
         <Klantgroep/>
      </Algemeen>
    <b></XBT></b>
    </mt_BubaBestand>

    This is pretty standard procedure if you are posting these messages to R/3.  As was pointed out in the weblogs above, when using IDocs you don't need to do any tricky configuration.  Just make sure that your XML structure is set correctly (ie:  1 to unbounded, etc) to the limits that you want, and XI will automatically loop the mapping process for each instance of the <XBT> item that it detects in the source message.  You mentioned:
    <i>For example the following XML file have to split up into 2 xml files (the elements XBT occurs 2 times)</i>
    Well, you don't actually split it into two XML files per say, XI just processes the source message straight to multiple IDocs using the IDoc adapter.

  • In SAP-XI stop generating of xml files

    Hi,
    In sap-xi i created a simple file to file scenario. After completion
    of end to end scenario the xml files are keep on generating. I have selected delete option in CommunicationChannel. The xml  file from source folder is deleted. Still the taget xml is generating in Destination folder.
    How to stop the generating of xml files
    Any one tell me the solution for this.
    Thanks,
    Ram

    Hi,
    Do the Following,
    1) Make sure that you deleted all the Files present in Source Directory
    2)Select the Processing mode as Delete.
    3)Now Place the File in the Source DIR path
    4)See Whether the file got deleted from the Source or not.
    5) Check the Sender CC in RWB
    6) Check the SXMB_MONI to get the Success Flag.
    7) Check the Receiver CC in RWB.
    8) Check the Receiver Directory whether received the file or not.
    Please check  these one-by-one
    Regards
    Seshagiri

  • Junk Characters in the output XML file after Parsing

    Hi
    I am using DOM parser to parse an XML file.
    After parsing the input XML file, i am fetching some contents
    from the same and also putting the same contents in the parsed output file which is also an XML file.
    The problem here is that the after putting the contents to the output XML file from the input XML file,
    some junk character appears at the end of each and every tag in the outputfile.
    The junk character is some thing like this : " ampersand hash thirteen and a semicolon "
    (*THE MESSAGE DID NOT ACCEPT THE SYMBOLS KINDLY TRANSLATE THE ABOVE WORDINGS*
    INTO SYMBOLS)
    This character gets appended at the end of each and every tag in the output file due to which the output file
    is not recognised as an XML file.
    Please let me know as to why is this character appearing and also please suggest some solution
    for the same.
    -Thanks in Advance.
    Edited by: itskarthik on Oct 10, 2008 7:16 AM
    Edited by: itskarthik on Oct 10, 2008 7:18 AM
    Edited by: itskarthik on Oct 10, 2008 7:19 AM
    Edited by: itskarthik on Oct 10, 2008 7:19 AM
    Edited by: itskarthik on Oct 10, 2008 7:23 AM
    Edited by: itskarthik on Oct 10, 2008 7:23 AM

    Wierd.
    Try this piece of code. (You can always change it to use input file and output file instead of string if you want)
    What is your output?
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    public class XMLTest {
         public static void main(String[] args) throws Exception {
              String input = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" +
                                  "<test>\r\n" +
                                  "</test>";
              System.out.println("Input:");
              lookForCR(input);
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              Document doc = factory.newDocumentBuilder().parse( new ByteArrayInputStream(input.getBytes()) );
              Source source = new DOMSource(doc);
              ByteArrayOutputStream bArrOut = new ByteArrayOutputStream();
              Result result = new StreamResult( new StripOutputStream( bArrOut ) );
              Transformer xformer = TransformerFactory.newInstance().newTransformer();
              xformer.transform(source, result);     
              System.out.println("\nResult:");
              lookForCR(bArrOut.toString());
              System.out.println("\nDone");
         public static void lookForCR(String input) throws Exception {
              char[] chars =input.toCharArray();
              for ( char chr : chars ) {
                   if (chr == 13 ) {
                        System.out.println("Has 0x0D character!!");
    class StripOutputStream extends OutputStream {
         OutputStream out = null;
         public StripOutputStream(OutputStream out) {
              this.out = out;
         @Override
         public void write(int b) throws IOException {
              if ( b != 13 )
                   out.write(b);
    }- Roy

  • Looking for a way to move a rejected xml file after loading it

    Hi all,
    I'm currently looking for a solution to do the following:
    I've loaded multiple xml files into an external table and after firing a few queries on that external table, I've moved the xml data into a normal oracle table
    depending on a few values which need to be met (e.g. last two digits of column a need to be the same as the last two digits of column b)
    All of this works fine, but I'd like to be able to move the xml files which don't meet these requirements to another folder on the filesystem named e.g. 'rejected'
    now, my shell script just moves all the xml files to a processed folder after loading them into an external table.
    I've looked at utl_file.frename but I need to be able to automatically move more than one file if neccesary instead of filling in one filename in the frename statement.
    (maybe the filenames need to be entered into a separate table?)
    Thanks in advance and your help is much appreciated!

    You can look through some of the different Layouts available.
    Select your page.
    Click the "Layout" icon on the lower right hand of the application window.
    Above it will appear a "BACKGROUND" section and a "LAYOUT" section.
    Immediately below the "LAYOUT" is a drop down menu which will show you all the different options.

  • C# Split xml file into multiple files

    Below i have an xml file, in this file, i need to split this xml file into multiple xml files based on date column value,
    suppose i have 10 records with 3 different dates then all unique date records should go into each file . for ex here i have a file with three dates my output should get 3 files while each file containing all records of unique date data. I didn't get any idea
    to proceed on this, thats the reason am not posting any code.Needed urgently please
    <XML>
    <rootNode>
    <childnode>
    <date>2012-12-01</date>
    <name>SSS</name>
    </childnode>
    <childnode>
    <date>2012-12-01</date>
    <name>SSS</name>
    </childnode>
    <childnode>
    <date>2012-12-02</date>
    <name>SSS</name>
    </childnode>
    <childnode>
    <date>2012-12-03</date>
    <name>SSS</name>
    </childnode>
    </rootNode>
    </XML>

    Here is full code:
    using System.Xml.Linq;
    class curEntity
    public DateTime Date;
    public string Name;
    public curEntity(DateTime _Date, string _Name)
    Date = _Date;
    Name = _Name;
    static void Main(string[] args)
    XElement xmlTree = new XElement("XML",
    new XElement("rootNode",
    new XElement("childnode",
    new XElement("date"),
    new XElement("name")
    string InfilePath = @"C:\temp\1.xml";
    string OutFilePath = @"C:\temp\1_";
    XDocument xmlDoc = XDocument.Load(InfilePath);
    List<curEntity> lst = xmlDoc.Element("XML").Element("rootNode").Elements("childnode")
    .Select(element => new curEntity(Convert.ToDateTime(element.Element("date").Value), element.Element("name").Value))
    .ToList();
    var unique = lst.GroupBy(i => i.Date).Select(i => i.Key);
    foreach (DateTime dt in unique)
    List<curEntity> CurEntities = lst.FindAll(x => x.Date == dt);
    XElement outXML = new XElement("XML",
    new XElement("rootNode")
    foreach(curEntity ce in CurEntities)
    outXML.Element("rootNode").Add(new XElement("childnode",
    new XElement("date", ce.Date.ToString("yyyy-MM-dd")),
    new XElement("name", ce.Name)
    outXML.Save(OutFilePath + dt.ToString("yyyy-MM-dd") + ".xml");
    Console.WriteLine("Done");
    Console.ReadKey();

  • Split XML files with XSL result document

    Hi All,
    I have below xml file...
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <T0020
    xsi:schemaLocation="http://www.safersys.org/namespaces/T0020V1 T0020V1.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.safersys.org/namespaces/T0020V1">
    <INTERFACE>
    <NAME>SAFER</NAME>
    <VERSION>04.02</VERSION>
    </INTERFACE>
    <TRANSACTION>
    <VERSION>01.00</VERSION>
    <OPERATION>REPLACE</OPERATION>
    <DATE_TIME>2009-09-01T00:00:00</DATE_TIME>
    <TZ>CT</TZ>
    </TRANSACTION>
    <IRP_ACCOUNT>
    <IRP_CARRIER_ID_NUMBER>274845</IRP_CARRIER_ID_NUMBER>
    <IRP_BASE_COUNTRY>US</IRP_BASE_COUNTRY>
    <IRP_BASE_STATE>AR</IRP_BASE_STATE>
    <IRP_ACCOUNT_NUMBER>55002</IRP_ACCOUNT_NUMBER>
    <IRP_ACCOUNT_TYPE>I</IRP_ACCOUNT_TYPE>
    <IRP_STATUS_CODE>100</IRP_STATUS_CODE>
    <IRP_STATUS_DATE>2007-11-06</IRP_STATUS_DATE>
    <IRP_UPDATE_DATE>2009-08-03</IRP_UPDATE_DATE>
    <IRP_NAME>
    <NAME_TYPE>LG</NAME_TYPE>
    <NAME>A P SUPPLY CO</NAME>
    <IRP_ADDRESS>
    <ADDRESS_TYPE>PH</ADDRESS_TYPE>
    <STREET_LINE_1>1400 N OATS</STREET_LINE_1>
    <STREET_LINE_2/>
    <CITY>TEXARKANA</CITY>
    <STATE>AR</STATE>
    <ZIP_CODE>71854</ZIP_CODE>
    <COUNTY>MILLER</COUNTY>
    <COLONIA/>
    <COUNTRY>US</COUNTRY>
    </IRP_ADDRESS>
    <IRP_ADDRESS>
    <ADDRESS_TYPE>MA</ADDRESS_TYPE>
    <STREET_LINE_1>P O BOX 1927</STREET_LINE_1>
    <STREET_LINE_2/>
    <CITY>TEXARKANA</CITY>
    <STATE>AR</STATE>
    <ZIP_CODE>75504</ZIP_CODE>
    <COUNTY/>
    <COLONIA/>
    <COUNTRY>US</COUNTRY>
    </IRP_ADDRESS>
    </IRP_NAME>
    </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    </T0020>
    and i want to take this xml file and split it into multiple files through java code like this ...
    File1.xml
    <T0020>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    </T0020>
    File2.xml
    <T0020>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    </T0020>
    so i have applied following xslt ...
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://www.safersys.org/namespaces/T0020V1" version="2.0">
    <xsl:output method="xml" indent="yes" name="xml" />
    <xsl:variable name="accounts" select="t:T0020/t:IRP_ACCOUNT" />
    <xsl:variable name="size" select="10" />
    <xsl:template match="/">
    <xsl:for-each select="$accounts[position() mod $size = 1]">
    <xsl:variable name="filename" select="resolve-uri(concat('output/',position(),'.xml'))" />
    <xsl:result-document href="{$filename}" format="xml">
    <T0020>
    <xsl:for-each select=". | following-sibling::t:IRP_ACCOUNT[position() < $size]">
    <xsl:copy-of select="." />
    </xsl:for-each>
    </T0020>
    </xsl:result-document>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Now i want to apply this XSL to xml through Java Code...
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Source xslSource = new StreamSource(xslFilePath);
    Transformer trans = tFactory.newTransformer(xslSource);
    trans.transform(new StreamSource(xmlFileName), new StreamResult( ????));
    here how can i map new StreamResult( ) input parameter with xsl Result document argument ??
    Please help me.....
    Or Can you give me a link of Example which use result document and Java transform method to Output multiple doucment ??
    Here new StreamResult take only 1 file as to be transformed ....

    hi Tejas ,
    I have done as you said but now able to generate multiple xml file .
    I am giving you the xsl file i have used ....
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:t="http://www.safersys.org/namespaces/T0020V1" version="2.0">
         <xsl:output method="xml" indent="yes" name="xml" />
         <xsl:variable name="accounts" select="t:T0020/t:IRP_ACCOUNT" />
         <xsl:variable name="size" select="5" />
         <xsl:template match="/">
              <xsl:for-each select="$accounts[position() mod $size = 1]">
                   <xsl:variable name="filename" select="concat(position(),'.xml')" />
                        <xsl:result-document href="{$filename}" format="xml">
                             <T0020>
                                  <xsl:for-each select=". | following-sibling::t:IRP_ACCOUNT[position() < $size]">
                                       <xsl:copy-of select="." />
                                  </xsl:for-each>                              
                             </T0020>
                        </xsl:result-document>                    
              </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>
    and i have done transformation like this ...
    Transformer trans = tFactory.newTransformer(xslSource);
    trans.transform(new StreamSource(xmlFileName), new DOMResult());
    but not getting any result .
    Can you please help me out ?
    - Nisarg

  • Splitting XML Files without namespaces

    Hello,
    I have a file that looks similar to this:
    <?xml version="1.0" encoding="UTF-8"?>
    <File>
     <Header>
      <Location>Phoenix</Location>
      <Date>052214</Date>  
     </Header>  
     <Bill></Bill>
     <Trailer>
      <Total>1076</Total>
     </Trailer>
    </File>
    What I would like to do is split the file (<Bill> is repeating) and I understand I should be able to do this with an envelope schema. I've done some research and every example I'm coming across happens to have a namespace in the sample schema.
    How can I accomplish the same thing without the namespace?
    Do I need to add the namespace using the ESB Toolkit, and if so, am I supposed to add a namespace to the repeating element? I looked into that solution and couldn't understand how to add a namespace to the Bill element, only the root. Unfortunately I trashed
    that approach and went with an orchestration. While that is working, it just doesn't seem right if I can accomplish this task in the receive stage.
    Any help/encouragement would be appreciated.

    The problem is that if you split the message on an element that has no namespace, you will need a Schema without namespace (in your case with a root element of "Bill" and no namespace).
    Having Schemas without namespaces in BizTalk is bad practice and should, in general and if possible, be avoided.
    So what I would do is create a custom Pipeline Component that (either using XDocument, XMLDocument or Regular Expression) appends a namespace to all "Bill" elements and also a namespace to the Root. 
    Apply the Component in the Decode Stage on your Receive Pipeline so that it is applied BEFORE the disassemble stage, and then create your "Bill" Schema with the newly appended Namespace, and also Apply the Batch namespace to your Envelope Schema.
    An Example:
    <?xml version="1.0" encoding="UTF-8"?>
    <b:File xmlns:b="http://Batch">
    <Header>
    <Location>Phoenix</Location>
    <Date>052214</Date>
    </Header>
    <c:Bill xmlns:c="http://namespace"></c:Bill>
    <c:Bill xmlns:c="http://namespace"></c:Bill>
    <c:Bill xmlns:c="http://namespace"></c:Bill>
    <c:Bill xmlns:c="http://namespace"></c:Bill>
    <Trailer>
    <Total>1076</Total>
    </Trailer>
    </b:File>
    Morten la Cour

  • Down loading SAP R/3 Data to XML file

    Hi all,
    How can I download the SAP R/3 Data to an XML file so that later on i can upload it to Sql Sever ?Thanks in advance.
    Best regards,
    Bhagat.

    HI Bhagat,
    See the below link for program which is uploading the XML file in to SAP, this will work in 4.6C
    http://www.geocities.com/rmtiwari/main.html?
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_RMTIWARI_XML_TO_ABAP_46C.html
    use this XML file for the above program:
    http://www.geocities.com/rmtiwari/main.html?http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/UtilityCode.html
    See the below link for one more program
    http://wiki.ittoolbox.com/index.php/Code:Download_and_upload_OO_ABAP_class_in_XML_format
    Message was edited by:
            Susmitha Thomas

  • Changes in the xml file AFTER submitting to store

    hi,
    I recently added a Podcast for BMWGroup.com to the iTunes store, which hasn't been released yet.
    What I want to know is, whether changes in the xml file, that i made AFTER submitting it will be taken over when the feeds are going to be released.
    For example a different categorie or image..
    and if not? how can i change categorie or image later? does it update from the xml?
    does anyone know?
    thx,
    best regards,
    oliver
    thx,

    Oliver:
    The simple answer is yes. Any changes you make to your RSS feed file (xml file) will eventually be updated by ITMS. Usually ITMS updates feed changes within 24 hours. However, the most recent changes I made in my feed files took almost 8 days before ITMS refreshed my listing.
    One issue is clear. If you make changes to your image file, there is a high probability that when ITMS updates your database record, your listing in ITMS will show the broken link image for awhile. I've changed my image file twice, and each time, my ITMS listing showed the broken link image. Eventually the new image shows up, but it does take a long time for this day and age.
    Good luck!

  • Split XML File

    I have a large xml file which i would like to split based on name of element and number of elements, so if i have 100000 <ELEMENT_A></ELEMENT_A> (as well as other elements) in file i want to generate 10 new files with 10000 elements each (only the ELEMENT_A elements).
    Wats the easiest and quickest way to do this, code would be welcomed

    The answer depends too much on the situation; for example:
    - are those numbers 100000 and 10000 fixed and known in advance?
    - are all elements first-level children of the document root? Or can they be scattered at various nesting level?
    - do you have enough memory to hold the whole DOM structure for the input document? (1)
    - along hich criteria do you group elements per output file: the first 10000 in input file order, then the next 10000, and so on (2)? Or, you have to sort them along another criteria?
    etc, etc.
    (1) If you have enough memory to hold all such input docs into memory, then the simplest approach would be to load the inut doc as a DOM tree, and iterate over the target elements. This way all subsequent logic (sorting, criteria,...) can be implemented in simple Java methods.
    (2)
    I can program in Java not done much with XML. All i want is solution that works well. ThanksToo bad - for fixed number splitting based on element position in the input doc, XSL would be a better match (using predicates on the elements' position()).
    Doing that in plain java (except if you use Java to run an XSLT over the input XML of course) involves more lines of code, but a better maintenability in the long run if more complex logic has to be taken into account.

  • How read the PDF and XML files after Unzipping the folder

    Hi Gurus,
    I have a zipped folder and i this two types of files .XML and .PDF files.
    I am able to unzip the folder and reading the .XML files, unable to read the PDF files.
    I want to send this PDF file to the target as it is.
    Please help me.
    Regards
    Sreeni

    Hi,
    Hi ,
    Plse see the below thread
    PI 7.1 : Taking a input PDF file and mapping it to a hexBinary attribute
    It will help you.
    You can write custom adapter modules:
    Java Mappingh;
    SAP Conversion agent:
    http://www.riyaz.net/blog/parsing-pdf-files-using-sap-conversion-agent-part-i/technology/sap/628/
    http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/content.htm

  • Windows Phone 8 Can't Update listbox item in XML file after using hardware back button?

    Hi All i have a list box and i am saving list box selected item in XML file thats working fine but the problem is that when i will close my app and reopen and add more value to list box my previous value is removed form the xml file and listbox also how
    i can save my current added value and previous value in xml file i am using following code :
    and iam using following code
    <Grid x:Name="ContentPanel" Grid.Row="2" Margin="15,10,15,0">
    <ListBox Name="list_location" Tap="list_location_Tap" Foreground="Black">
    <ListBox.ItemTemplate>
    <DataTemplate>
    <TextBlock x:Name="item_name" Text="{Binding description, Mode=OneWay}" Padding="5,15,5,15" TextWrapping="Wrap" FontSize="{StaticResource PhoneFontSizeLarge}"/>
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    <ListBox Name="list_locationAdd" Background="Red" Foreground="Black" Visibility="Collapsed">
    <ListBox.ItemTemplate>
    <DataTemplate>
    <TextBlock x:Name="item_name" Text="{Binding description, Mode=OneWay}" Padding="5,15,5,15" TextWrapping="Wrap" FontSize="{StaticResource PhoneFontSizeLarge}"/>
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    </Grid>
    and my back end code is follow:
    XmlWriterSettings x_W_Settings = new XmlWriterSettings();
    x_W_Settings.Indent = true;
    using (IsolatedStorageFile ISF = IsolatedStorageFile.GetUserStoreForApplication())
    using (IsolatedStorageFileStream stream = ISF.OpenFile(filename, FileMode.Create))
    XmlSerializer serializer = new XmlSerializer(typeof(ObservableCollection<Prediction>));
    using (XmlWriter xmlWriter = XmlWriter.Create(stream, x_W_Settings))
    data.Add(new Prediction() { description = App.professionalId });
    list_locationAdd.ItemsSource = data;
    serializer.Serialize(xmlWriter, data);
    protected override void OnNavigatedTo(NavigationEventArgs e)
    try
    if (list_locationAdd != null)
    using (IsolatedStorageFile ISF = IsolatedStorageFile.GetUserStoreForApplication())
    using (IsolatedStorageFileStream str = ISF.OpenFile(filename, FileMode.Open))
    XmlSerializer serializer = new XmlSerializer(typeof(ObservableCollection<Prediction>));
    ObservableCollection<Prediction> data = (ObservableCollection<Prediction>)serializer.Deserialize(str);
    if (list_locationAdd != null)
    this.list_locationAdd.ItemsSource = data;
    list_locationAdd.Visibility = Visibility.Visible;
    catch (Exception ex)

    Can you provide a working sample?  Upload to Onedrive and share it with us.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Merging XML Files After Debatching - 10.1.3.4

    I have a large fixed-width file which I am debatching and transforming to XML files:
    bigfile.txt (~52MB) -> file_%SEQ%.xml (~4MB each)
    resulting in:
    file_2001.xml (~4MB)
    file_2002.xml (~4MB)
    file_2003.xml (~4MB)
    file_2004.xml (~4MB)
    I would like to merge these resulting XML files back into one XML file:
    bigfile.xml (~52MB)
    I know the [Append="true"] attribute in the file adapter used to write the file won't "work" with XML files. I've tested this anyway and received "out of memory" errors while appending. This removes post-processing options.
    I'm new to BPEL and feel that I must be missing something simple. Any advice would be appreciated.
    Thanks in advance,
    Rob

    Hi Rob,
    You can create a temp variable of xsd type of bigfile.xml, read all below files one by one and within assign activity use append operation to append all xml files, when all read is complete, dispatch this message to file adapter to write file.
    file_2001.xml (~4MB)
    file_2002.xml (~4MB)
    file_2003.xml (~4MB)
    file_2004.xml (~4MB)
    Here, there is a possibility of out of memory error.
    Please try it,
    Regards

Maybe you are looking for

  • How do I put a password into the time cap. so no one can steal my internet

    We have had a time cap for awhile, have backed up our pictures etc. and have a password for that. We just got onto wireless internet and we would like to password that part of it. Please explain how we can do this and each time we open up our compute

  • Best way to organize photos and home video

    Looking for the optimum way to organize photos and home videos. Goal is to have all devices have equal access to all the media. Just as important is for this to be as easy as possible to maintain and use. Have an iMac with iTunes and iPhoto Have mult

  • Color shift writing to PDF

    Am getting a slight color shift when exporting from InD to Acrobat PDF... slight shift towards a more magenta tint... see attached. http://peterpica.com/comparison.pdf All colors are process in source file and am writing to standard print-ready (4/c)

  • Alv list printing-dump error

    hai, i get following dump error when tryign to print a alv list report. 'Illegal interruption of the event LOAD-OF-PROGRAM. What happened? Error in the ABAP Application Program The current ABAP program "SAPLSZA12" had to be terminated because it has

  • Exchange 2007 with windows 2012 R2 domain controllers environment.

    Hello, I am planning to upgrade to AD windows 2012 R2 from 2008 in 2003 on funtional level for domain and forrest, my question is, is 2007 exchange (Version build: 08.03.0245.001) supported on 2012 R2 domain environment on 2008 funtional level? I am