cancel
Showing results for 
Search instead for 
Did you mean: 

Convert root node into xstring

Former Member
0 Kudos

Hi ,

I have a requirement where I need to convert the root node along with its child nodes into xstring format. I checked a couplthee of methods , but i am unable to get the xstring like we get if we have form ui element in wd abap . I want the similar xstring which contains all the fields in the context.

Any help would be really useful.

Thanks,

Saujanya

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

Hi Saujanya,

I'd be very interested to know the reasoning behind the request - serialising of WD - sounds interesting!

Can you not just use the to_xml method of IF_WD_CONTEXT_NODE interface? Perhaps I am misunderstanding you, which method of the element are you using to get an XSTRING representation of the element?

I'd guess this (to_xml) only takes the current node, not all the sub nodes - but you could recursively loop around the structure pretty easily if you had a reference to the top level node.

to get all the context attributes instead get the node info - IF_WD_CONTEXT_NODE->GET_NODE_INFO

this then has methods to list all attributes of the node.

If this is not the info you are after, could you please clarify your original request?

Thanks,

Chris

Former Member
0 Kudos

hi Chris,

Thanks alot for your reply.

Actually I was looking out for this method. the requirement has come because it is a third party system which uses the xml for further processing .

The webdynpro is the initial step . it resolved the issue.

Regards,

Saujanya

Answers (0)