I receive email messages (XML). With no namespace in it. I know that I need a pipeline with a decoder. Where can I find this decoder and how can I use it? Also how can I get rid of text I don't want? Like this:
<Root><Node>sjdfk</Node></Root>Unwanted text here that I must remove
I think you'll have to pre-process the message with a custom pipeline component before you get to the XML stage. You can move through the stream and remove upwanted text and add a namespace if you want.
These are not really that easy to build so it will take some time to ensure you do it correctly.
Stephen W. Thomas http://www.BizTalkGurus.com
Ok, where can i get this pipeline component?
You will need to write it from scratch to process the message in your format.
If you wanted something easer to write, but less performing you could send the message to an Orchestration as an XML Document. Then process the message inside a .net component.
Does that make sense?
I'm new to Biztalk and have only worked with it for 3-4 weeks so it doesn't makes sense.
It thought that it wouldn't be so hard to change <Root> to <ns0:Root xmlns:ns0="http://XXX_Root.Root"> but apparently it is :(
I guess I need to work more on pipeline exercises.
I have some adjustements in my question. The input is not XML to start with. Its a flat file that looks like <Root><Node1>Blabla</Node1><Node2>BlaBla</Node2> in an email.
If i use the flat file schema wizard for this it will look something like this:
Which makes it a problem.... Is it possible to have a flat file that looks like an xml and turn it to an real xml by adding a namespace and remove some junk-text at the bottom?
It’s an interesting idea, to use the Flat File parse on this. While could probably get something to kind of work you might end up with undesired results… XML is more 1 to many in terms of nodes. Flat Files are fixed width / delimiter.
I think it would be safer to bring this into an Orchestration as an un-typed message and use .net to parse it. This isn’t as scalable than a pipelines but much easier to code and test. I have several samples on this site covering the un-typed messages. Then you just have to parse the message to fit your needs. You can always re-publish the message out of this Orchestration or call a Receive Pipeline after you process the message.
Hope this helps.
Ok, thanks I will give this a try. Can you give me one of the un-typed messages samples please?
Here is a good sample - www.biztalkgurus.com/.../15551.aspx
You can find others in the Media section, under BizTalk 2004.