Author |
Message
|
chanduy9 |
Posted: Mon Apr 15, 2002 10:08 am Post subject: |
|
|
Disciple
Joined: 28 Nov 2001 Posts: 177 Location: USA
|
Hi,
I am trying to remove xml tags...but i couldnt..i am using following code
WHILE i <= QMC DO
SET OutputRoot.XML.TEST.QM=NULL;
SET OutputRoot.XML.TEST.QN=NULL;
SET i=i+1;
END WHILE;
it is giving me <TEST/>, but i dont what that..i want remove XML tag completly..
any suggestions..
Thanks in advance.
Chandra. |
|
Back to top |
|
 |
kolban |
Posted: Mon Apr 15, 2002 10:26 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Could you post an example of incoming XML and desired outgoing XML? |
|
Back to top |
|
 |
chanduy9 |
Posted: Mon Apr 15, 2002 10:55 am Post subject: |
|
|
Disciple
Joined: 28 Nov 2001 Posts: 177 Location: USA
|
i want to remove which ever coming under
OutputRoot.XML.TEST
Thanks,
Chandra. |
|
Back to top |
|
 |
kirani |
Posted: Mon Apr 15, 2002 11:41 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
If you are using WMQI 2.1 then you can use DETACH ESQL statement.
|
|
Back to top |
|
 |
Segs |
Posted: Tue Apr 16, 2002 6:23 am Post subject: |
|
|
Voyager
Joined: 04 Oct 2001 Posts: 78 Location: Zurich Financial Services
|
I maybe missing something here but can't you simply use
SET OutputRoot.XML.Test = Null
But if you are using MQSI 2.0.2 you can only have one main XML container so this will wipe out everything.
Is this correct? |
|
Back to top |
|
 |
CodeCraft |
Posted: Fri May 17, 2002 11:41 am Post subject: |
|
|
Disciple
Joined: 05 Sep 2001 Posts: 195
|
This could be a bug. For generic XML, the parser should really be able to distinguish between an element which is explicitly set to null, and an element which is explicitly set to an empty string ''. To my mind, the first should result in removal of the XML tag/value from the tree, the second should result in an empty element <TEST/>.
Since there are no null handling properties for generic XML I suspect this should be the behaviour. Are you working with 2.1 CSD 02, if not, I would try with this and then perhaps raise a query directly with IBM Support on the issue. |
|
Back to top |
|
 |
suneelsh |
Posted: Fri May 17, 2002 10:33 pm Post subject: |
|
|
 Acolyte
Joined: 13 Apr 2002 Posts: 69 Location: Pune,India
|
to remove everything under test first create a reference to test then detach it. later on if you wish to attach it somewhere else you can used the reference created earlier. |
|
Back to top |
|
 |
CodeCraft |
Posted: Sat May 18, 2002 12:44 am Post subject: |
|
|
Disciple
Joined: 05 Sep 2001 Posts: 195
|
There may still be an issue here, since the 2.0x behaviour for setting something = Null is to remove it from the tree. The 2.1 implementation of Null handling should at least ensure that it works the same way as it used to. |
|
Back to top |
|
 |
|