I am trying to process a xml document coming in from TN and am getting the error attatched to this post on a getNextXMLNode invoke step (stacktrace.txt). What I am trying to do is extract all of the attributes and their values and create a whole new XML file from that.
Basically the incoming document is extremely generic and the real elements and their data/etc. are actually the attributes. My processing sequence is as follows: Convert using BizDocToRecord, Convert Bound Node to an XML string using documentToXMLString, and then converting the string to a node using XMLStringToXMLNode.
After this I am trying to loop through the nodes and strip out the attributes and their values, however, something is getting choked on the DBE namespace and I am not sure how to remedy it. I tried adding namspace mappings in the Namespace Tab of the Document Type definition dialog, but this didn’t work either.
So my question is really two:
- What is causing the error below and how do I fix it?
- Am I approaching this correctly with the steps I outlined above?
See the snippets file for an example of what I am trying to explain.
Thanks in advance!
In the documentToXMLString method you can set the nsDecls variable to include prefix/namespace pairs. You might want to try that. Otherwise, might it be an option to rearrange or rebuild the new XML by first rearranging the incoming document and than converting it to XML?
Good luck, Chris
You are the man, that worked! I tried setting nsDecls before, however, I think I set it on a different invoke step than documentToXMLString and it wasn’t working. Either way, the error is no more now. Now I just need to see if I can make it work the way I want it to from here.
It sure helps to have an objective standpoint when you are working yourself in circles. Again, thanks bud I sincerely appreciate it!
Excellent! I can imagine your worries. I have been battling SOAP messages for the past few days & also ran into a number of NS issues.
I am working XML parsing between trading partners.
My XML file contains NameSpace tags, so i set the NameSpace tab in XML document creation.
I am executing one service after coming the XML file into my trading network.
In that service I am using following services
2)WriteToFile(In that service I am mapping one field to the file content)
but my problem is I am seeing that file in the file location but in that file there is no data.
Here i am sending my XML file.
So please tell me the solution.