I need to transform XLS to a certain XML-schema.
Unfortunately I´m not really familiar with xml at all, but it looks like EDT could do this job for me.
Currently I am stuck at two points:
1st.: I need to create a node that contains a space in the node-name. EDT converts spaces to hyphens and I have not manages to escape this by now.
2nd: Referring to the sample I receive I need to add attributes to the root node - but found no way to archive this so far.
Thank you so much for any advice in advance.
thank you so much for this swift reply.
Unfortunately the schema requires me to use spaces as well as colons. (Colons seem to be working - just a warning is shown.)
I will use the plaintext replace.
In regards of the root node.
In my example it currently looks like this - so I´m trying to reproduce it as good as possible:
Sorry, misread that second question. There is currently no away to directly add attributes to the root XML node. But you could read the XML file back in as plain text and use a Replace transform to add the attributes. Then write it back out as plain text.
Thank you for this great support.
Yes I will do so - this has already been an option I planned to use if there is no other way.
I will probably run into some more questions as I have to complete the conversion by Monday
I´m stuck with a new question: I need to create “empty” nodes with just attributes in them.
If the node has no “value” EDT does not attach the attributes to it. As soon as I enter any value it works. Can I get this working somehow - or will I have to use a plaintext replace afterwards as well and replace my “> <” with “><”?
Thank you in advance.
its urgent - could you help?
I thought I got it finally all working as I was able to create all XMLs needed, but now I uploaded them to the system I created them for - and they all fail because the order of the nodes seem to be important…
Certainly I sorted my rows but in the end the nested nodes and the ones with even more children in them get sorted after the ones without children or less children.
Can I use somehow a plaintext reorder to solve this?
I found no transform so far that could do this job for me - and manual reordering is no option, as we are talking about 2000+ files.
Thank you in advance,
I just learned it could be important in some cases. Found one possible explanation: “XML node order can matter is where an application is using a streaming parser. Having dependent elements in the expected order can allow the application to be significantly more efficient processing the XML data”
I guess this applies to the system I need to deliver.
Is there any chance EDT could take care of the node order in XMLs in future versions?
My workaround works now - but its very static and if I get more or less lines in an XML it will require a new transform every time.
I have overcome some of the XML limitations of EDT by getting as much of possible done with EDT and then using XSLT to get the rest of the way. XSLT is a W3C standard language for transforming XML to XML (and other formats such as HTML, plain text, etc.). All kinds of transformations are possible with XSLT including converting elements to attributes, sorting, filtering, adding namespaces, etc. If you can post a before/example sample, I can post some XSLT code.