I noticed a problem with importing xml files.
I'm working on a port that imports Finvoice invoice in but on its first tag (in version 1.3) it has schema and namespace attributes after Finvoice tag.
Nav xml port gives me an error with attribute tag named with those colon marks. Would there be any workaround how to get those attributes working with the port or do I have to remove them beforehand?
<Finvoice Version="1.3" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Finvoice.xsd">
I used xmldom with other port I made, it has some code that removes a tag but only the first one.
If similar way around could be used to remove these 2 attributes that'd solve the problem but I'm not sure how to select the xmlns:xsi and xsi:nonamespaceschemalocation with the xmldom automation and remove them.
If I delete the finvoice tag, pretty much whole invoice is deleted from the xml file.
Anyone come accross with this kind of problem?
K.S.
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Otherwise it does the trick now.
I have ... '<xsl:template match="@*" />' + ...
for removing the tags.
But why does it say that its not declared and which object is it pointing? the xml port or the form I'm calling the removenamespace function?
the namespace I typed above is on the xmlns:xsi attribute ="http://..." value
from xml
<Finvoice Version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Finvoice.xsd">
to new xml
<Finvoice Version="1.3" noNamespaceSchemaLocation="Finvoice.xsd">
And still gives same error that that namespace xmlschema-instance url is not defined. :-k