Author |
Message
|
vani_cool |
Posted: Thu Aug 18, 2011 10:33 am Post subject: Creating bit stream for XML data only |
|
|
Novice
Joined: 15 Jul 2009 Posts: 17
|
Hi,
I have a very big XML::: say like
<testTag>
fieldvalue
</testTag>
i want to convert it to the bit stream - in such a way that in the hex result i only have "fieldValue" and no xml tags.
asbitstream - is converting my whole xml and when i see in hex to text convertor i see the xml tags too.
any helps? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 18, 2011 10:54 am Post subject: Re: Creating bit stream for XML data only |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vani_cool wrote: |
I have a very big XML::: say like
<testTag>
fieldvalue
</testTag> |
I've seen bigger XML documents.....
vani_cool wrote: |
i want to convert it to the bit stream - in such a way that in the hex result i only have "fieldValue" and no xml tags. |
Then what you're trying to do is transform the document into a string of the tag contents. You'll need to write code to do that; I'd imagine the easiest way would be to itterate though the tags anonomously and extract the values. Others may imagine an easier / better method.
How do you plan to use this string when you've built it? Given you've not mentioned delimiting the fields in any way, or indicating how long the values are.
vani_cool wrote: |
asbitstream - is converting my whole xml and when i see in hex to text convertor i see the xml tags too. |
Yes, because it converts the message tree. What else is it going to do? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
vani_cool |
Posted: Thu Aug 18, 2011 1:09 pm Post subject: |
|
|
Novice
Joined: 15 Jul 2009 Posts: 17
|
thanks for the reply --- is there any other way?? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 18, 2011 1:59 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vani_cool wrote: |
thanks for the reply --- is there any other way?? |
Like I said, potentially.
I don't see there's a way to do it with a single line of ESQL (though others might).
I also still don't see what use an undelimited string of concatenated values is. But the point is you do.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
paintpot |
Posted: Fri Aug 19, 2011 12:34 am Post subject: |
|
|
Centurion
Joined: 19 Sep 2005 Posts: 112 Location: UK
|
You could model it in a CWF format MRM - this may be sufficient depending on exactly what your end result should be. You can then transform it with one line of ESQL, or use an RCD node.
 |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 19, 2011 4:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
paintpot wrote: |
You could model it in a CWF format MRM |
Does presuppose that the XML is a known format & this isn't a generic routine to "flatten" any number of XML documents.
Which isn't an unreasonable supposition.
It also presupposes that the OP isn't trying to flatten the document into a string for later processing in the flow.
Which isn't an unreasonable supposition.
I'm still wondering what use the output is.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|