Author |
Message
|
Gemz |
Posted: Thu Jul 31, 2008 2:52 am Post subject: Can we remove the whitespaces in XMLNSC parser |
|
|
 Centurion
Joined: 14 Jan 2008 Posts: 124
|
Hi,
I am using XMLNSC parser using message sets in WMB v6.1.
In the input xml, I am getting some unwanted whitespaces. I am validating this message using validation node in the flow. I want to remove those unwanted whitespaces before validating the message.
Is there a way to do this....
I am getting the input file using FileInput node.
Thanks
GemZ |
|
Back to top |
|
 |
Gaya3 |
Posted: Thu Jul 31, 2008 3:04 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
does the TRIM command in ESQL helps you _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
sridhsri |
Posted: Thu Jul 31, 2008 6:20 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
If I remember correctly, there is a checkbox which says "Ignore WhiteSpaces". Perhaps you need to use that. |
|
Back to top |
|
 |
Gemz |
Posted: Thu Jul 31, 2008 8:03 am Post subject: |
|
|
 Centurion
Joined: 14 Jan 2008 Posts: 124
|
Quote: |
does the TRIM command in ESQL helps you |
Yes, thats one thing we can do. But I like to know whether we can do that while parsing the message in input node itself.
Quote: |
If I remember correctly, there is a checkbox which says "Ignore WhiteSpaces". Perhaps you need to use that. |
In the messageset i tried with setting the option Whitespace "collapse". |
|
Back to top |
|
 |
sridhsri |
Posted: Thu Jul 31, 2008 9:18 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
I saw this in the help:
Quote: |
The XMLNSC parser reduces the amount of memory used by the logical message tree that is created from the parsed message. The default behavior of the parser is to discard non-significant white space and mixed content, comments, processing instructions, and embedded DTDs; however controls are provided to retain mixed content, comments, and processing instructions, if required. |
So, the default the default behavior is to discard the whitespace. I wonder why that didn't work for you. Are you doing something to retain those whitespaces (the retain options are on the input mode). |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jul 31, 2008 10:54 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
In the input xml, I am getting some unwanted whitespaces. |
sridhsri is correct ( again ). XMLNSC does discard mixed content by default. However, it does not trim element or attribute values. So where is this unwanted whitespace? Is it 'mixed content', or is it part of the value of an element or attribute?
Please post the snippet of XML and the message tree that you get when you parse it using XMLNSC. |
|
Back to top |
|
 |
|