Re: How to split XML file based on data in BizTalk



Thanks ak

Unfortunately, I cannot modify the source schema. This schema was
generated using BizTalk DB2 adapter and if I modify the schema, DB2
adapter failed to load data.
However, I don't think it is even possible with envelop techinque.
I build a custom pipeline component that split the XML document into
multiple xml. When i debug the component, there are no exception and
it splits the document fine but somehow those xml documents failed
with error Routing Failure Report for "<Name is not available>" andi
do not see message part for this message. I do have send port which
subscribe to those messages as well.

I do not see any easy solution to it.

Any ideas?

Thanks

Linesh

On Mar 13, 5:22 pm, kitche...@xxxxxxxxxxx wrote:
On Mar 13, 3:04 pm, linesh.gaj...@xxxxxxxxx wrote:





Hi All,

I am trying tosplitthe xmlfilebasedon the value. Somehow, i do
not have the success yet. There are lots of example of splitting flat
filebut not the XMLfile. Here is a sample XMLfile

<DB2QueryResult xmlns="DB2Query">
<F57EDID Idenfitier="H" QADATA="Hdata1" QAUKID="10.0"/>
<F57EDID Idenfitier="N" QADATA="Ndata1" QAUKID="10.0"/>
<F57EDID Idenfitier="D" QADATA="Ddata1" QAUKID="10.0"/>
<F57EDID Idenfitier="H" QADATA="Hdata2" QAUKID="10.0"/>
<F57EDID Idenfitier="N" QADATA="Ndata2" QAUKID="10.0"/>
<F57EDID Idenfitier="D" QADATA="Ddata2" QAUKID="10.0"/>
</DB2QueryResult>

I want tosplitthefilewhenever Identifier="H" occurs. Identifier
='H' is a to determine a new transaction. My output should be 2 XML
files as in above XML there are 2 transactions.

I can't find the the way tosplitthefile.

Thanks in advance

Linesh

Linesh, this sounds like a multi-part process. The overview would be:
first, look into parsing the original document interchange (see Jan
Tielen's bloghttp://weblogs.asp.net/jan/archive/2004/03/07/85259.aspx).
Second, I'd use an orchestration to add messages back togetherbased
on the identifier "H".

However, To make your life easier (if possible) I'd look into
modifying the sourcedataouput so that the xml can be formed
something like...

<DB2QueryResult xmlns="DB2Query">
<transaction Idenfitier="H" QADATA="Hdata1" QAUKID="10.0">
<F57EDID Idenfitier="N" QADATA="Ndata1" QAUKID="10.0"/>
<F57EDID Idenfitier="D" QADATA="Ddata1" QAUKID="10.0"/>
</transaction>
<transaction Idenfitier="H" QADATA="Hdata2" QAUKID="10.0">
<F57EDID Idenfitier="N" QADATA="Ndata2" QAUKID="10.0"/>
<F57EDID Idenfitier="D" QADATA="Ddata2" QAUKID="10.0"/>
</transaction>
</DB2QueryResult>

Hope some of this helps.

-ak- Hide quoted text -

- Show quoted text -


.



Relevant Pages

  • Re: Cannot validate a ".xsd" file (Xerces 2.7.0 C++ on Windows XP)
    ... > I downloaded the binary version of Xerces C++ 2.7.0 for Windows and am ... > using it to help me get up to speed with XML and XML Schema. ... Declaration Syntax, not XML Document Syntax. ...
    (comp.text.xml)
  • Re: Applying schema and default attributes
    ... schema, would inject the value in the event that it is missing. ... I understand XSD is used to validate the XML, ... If the XML document does not have an attribute that the schema ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Validating XML Against a XSD Schema
    ... Validating an XML Document Against an XML Schema Using C++ ... To validate an XML document file with an XML Schema definition language schema file using C++, you load XML and XSD documents and create a schema cache as in the following example. ... Input file: books.xsd ...
    (microsoft.public.dotnet.xml)
  • Re: Validating XML Against a XSD Schema
    ... Validating an XML Document Against an XML Schema Using C++ ... To validate an XML document file with an XML Schema definition language schema file using C++, you load XML and XSD documents and create a schema cache as in the following example. ... Input file: books.xsd ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Linking an stylesheet outside the XML instance
    ... things with an XML instance without modifying it. ... to modify all the XML documents each time. ... load the XML document in a browser window, depends on the xml-stylesheet processing instruction. ... But XSLT in general does not, rather you have an XSLT processor that has a command line feature to select both XML and ...
    (comp.text.xml)