Author |
Message
|
paustin_ours |
Posted: Fri Sep 02, 2005 9:15 am Post subject: xml namespace |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
?xml version="1.0" encoding="UTF-8"?>
<ttd:message ggId="xxxx" Class="" xmlns:ttd="dddddddddddd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="dddddddddd"
have an incoming message of this form.
how can i access the attribute ggid and Class
i set the domain in my input node to XMLNS,
i tried
InputRoot.XMLNS.ttd:message.(XML.Attribute)ggId
does seem to get the value.
tried
fieldvalue(InputRoot.XMLNS.ttd:message.(XML.Attribute))
does seem to work.
any suggestion how i can access this? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 02, 2005 9:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Trace the parsed message.
That will tell you *exactly* how to access the element. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 02, 2005 9:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Whitespace is not usually the same field type as an XML Element. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
paustin_ours |
Posted: Fri Sep 02, 2005 9:43 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
that helped thanks. now naother issue.
i retrieve the value from the attribute and tried to cast it as BLOB. it is erroring out. can i not convert a string in teh attribute to a BLOB? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 02, 2005 9:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
paustin_ours wrote: |
it is erroring out. can i not convert a string in teh attribute to a BLOB? |
You can convert strings to BLOBs. It doesn't matter where the strings come from.
"erroring out" is not helpful. Be *specific*. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
paustin_ours |
Posted: Fri Sep 02, 2005 9:54 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
i tried,
SET HEADER = ASBITSTREAM(InputRoot.XMLNS.ttd:message.(XML.Attribute)ggId);
i tried a cast as blob, that dint work.
i had to declare the namespace ttd to pick it up.
now i get the error that no actual body of the message found.
i have declared header as BLOB
i declared header as CHARACTER and i saw the value stored in the header.
wheni do a cast or asbitstream it doesn't seem to work.
any thoughts? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 02, 2005 9:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You don't need ASBITSTREAM for a single value. You only need ASBITSTREAM for a subtree. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
paustin_ours |
Posted: Fri Sep 02, 2005 9:59 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
i get BIP 2590 when i do a cast, it says the String is not correct format for byte array
must contain of only 0...9, a...f, A....Z
does that mean i cannot cast lower case string? |
|
Back to top |
|
 |
paustin_ours |
Posted: Fri Sep 02, 2005 10:01 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
statement used
SET HEADER = CAST(InputRoot.XMLNS.ttd:message.(XML.Attribute)ggId AS BLOB);
the value in ggId is xxxx |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 02, 2005 10:02 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Nope.
It probably means you should include a CCSID. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
paustin_ours |
Posted: Fri Sep 02, 2005 10:23 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
yup. thanks man. it worked. |
|
Back to top |
|
 |
|