Author |
Message
|
Praveer |
Posted: Thu Feb 01, 2007 7:24 am Post subject: Asbitstream function |
|
|
Newbie
Joined: 23 Jan 2007 Posts: 8
|
Hi,
I am using asbitstream function and i am using xmlnc parser. It throws me following error to
when my input is like
<m0:itemlist atrrib="xyz">somevalue</m0:itemlist>
ERROR "Invalid target for folder bitstream"
But when i try following
<m0:itemlist atrrib="xyz"/>
It works
Following is the code snippet
SET itemBlob = ASBITSTREAM(content CCSID K_MSG_CCSID ENCODING K_MSG_ENCODING OPTIONS FolderBitStream); _________________ PRAVEER |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 01, 2007 7:43 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5543 Location: Southampton
|
If you want to use FolderBitstream mode, the target element ( 'content' in your case ) must have the following characteristics:
- It must be a Name element ( not a Name-Value or Value element ).
- It must not be one of the 'special' element types ( like XMLNSC.XmlDeclaration ). |
|
Back to top |
|
 |
Praveer |
Posted: Thu Feb 01, 2007 12:00 pm Post subject: |
|
|
Newbie
Joined: 23 Jan 2007 Posts: 8
|
hi kimbert
My requirement is to create a blob of small part from xmlnsc tree.
so that i can store blob in oracle db. and read from db to again add in some another message tree.
SET itemBlob = CAST(ASBITSTREAM(InputRoot.XMLNSC.*:y.*:Body.{x}:content ) AS BLOB);
i am getting the followinng
"No valid body of the document could be found."
please help it's very urgent..  _________________ PRAVEER |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 01, 2007 2:44 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5543 Location: Southampton
|
My last post told you what the problem is. 'content' is probably a NameValue node. It must not have a value - otherwise you will get that error.
If you think about it, XMLNSC is just helping you to avoid data loss. If your element 'content' has a value, where exactly were you expecting that value to appear in the resulting bitstream?
Code: |
<content><child1></child1>Should the value go here?</content> |
|
|
Back to top |
|
 |
Praveer |
Posted: Fri Feb 02, 2007 12:50 am Post subject: |
|
|
Newbie
Joined: 23 Jan 2007 Posts: 8
|
Hi Kim
I want the values at follows
<content attrib1="val1" attrib2="val2">content value</content> _________________ PRAVEER |
|
Back to top |
|
 |
|