on 05-14-2009 8:31 AM
Hi All,
I am sending an XML data from SFTP to Proxy, in that I want to remove the header tag (first tag) from the xml, while loading the data. how to do that ?
Hi,
You can aheive it by using doccuemt offset : ignored.
Sameer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have converted the flat file to xml using the "Content Conversion Using MessageTransformBean". In that there is no "document offset" parameter. so pls tell me how to remove this part from the xml data.
<Emp_details>
<Emp_Id> Employee No </Emp_Id> // I want to remove this whole part.
<Emp_Name> Employee Name </Emp_Name>
</Emp_details>
<Emp_details>
<Emp_Id> 1234 </Emp_Id>
<Emp_Name> xxxx </Emp_Name>
</Emp_details>
<Emp_details>
<Emp_Id> 5678 </Emp_Id>
<Emp_Name> yyy </Emp_Name>
</Emp_details>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi,
> I have converted the flat file to xml using the "Content Conversion Using MessageTransformBean". In that there is no "document offset" parameter. so pls tell me how to remove this part from the xml data.
I dont think there is an option when you use the MessageTransformBean. Will wait to see if somebody know it can be done.
But meanwhile, i suggest that you can always ignore that header when you do the transformation to the target by not mapping that.
Else another way would be to use a java mapping and remove that particular entry.
Hi,
Does your SOURCE TEXT file has this header information?
Then you can restrict that information in the Message Mapping by putting a condition
if you are mapping <Emp_Details> node to some target node, then put a condition like
<Emp_Details> -> Index -> Equals -> Not ->If -> YOur Target Node
Constant "1" <Emp_Details>
Regards,
ravi
Edited by: Ravi Kanth Talagana on May 14, 2009 1:21 PM
>
> Hi All,
>
> I am sending an XML data from SFTP to Proxy, in that I want to remove the header tag (first tag) from the xml, while loading the data. how to do that ?
The header is in the Source XML right?
So in that case dont try to remove the header tag etc. Read it completely and when you have to map it to the target, make sure you dont map it. that way it is as good as you ignored the header tag.
Spending time and effort to remove something in the source data structure is not advised unless for any specific reasons
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sabharish,
Thanks for your comment. But my input file is text, i am converting that to xml, so in the output i am getting the header fields as the first tag in the xml like,
<Emp_details>
<Emp_Id> Employee No </Emp_Id>
<Emp_Name> Employee Name </Emp_Name>
</Emp_details>
<Emp_details>
<Emp_Id> 1234 </Emp_Id>
<Emp_Name> xxxx </Emp_Name>
</Emp_details>
<Emp_details>
<Emp_Id> 5678 </Emp_Id>
<Emp_Name> yyy </Emp_Name>
</Emp_details>
so I want only the data.... what should I do to remove the first tag... ?
use the option as below in the adapter
Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.
This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.
More @ http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Hi,
It is not about the thing that, whether your source is XML or flat file. If you dont want some thing in your source file , dont consider it and dont map it with your target structure. think that, your not getting the header in your source. What is the header here.
<Emp_details>
<Emp_Id> Employee No </Emp_Id>
<Emp_Name> Employee Name </Emp_Name>
</Emp_details>
<Emp_details>
<Emp_Id> 1234 </Emp_Id>
<Emp_Name> xxxx </Emp_Name>
</Emp_details>
<Emp_details>
<Emp_Id> 5678 </Emp_Id>
<Emp_Name> yyy </Emp_Name>
</Emp_details>
you have two fields under node Emp_details. What do u want to avoid here?
Regards,
Reyaz
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.