[XML Records] record to XML
xml-records
Service icon
Forge component by Afonso Carvalho

Asked before i'll try again.

<RecordList xmlns:xxx="http://namespace.com/test" xmlns:n1="http://namespace.com/test2" xmlns:n2="http://namespace.com/test3" >

Where did i define the namespaces ?

Thanks in advance

mvp_badge
MVP

Hi Dieusaert,

Your question lacks a bit of detail, what are you trying to do? Is this XML you need to generate or to process?

Regards,

Daniel

mvp_badge
MVP

I think they refer to this post.

mvp_badge
MVP

So, to the original poster, including that link that Kilian did, would have been the smart thing to do

mvp_badge
MVP

Hi Dieusaert,

In the link to the discussion that Kilian shared, you ask a question on an old discussion from 2019.

Next time create a new question, which makes much more sense, and also allows you to mark a reply as solution, if one is provided.

Now why are you opening a new discussion,?as you are already discussing it in the other link... please do not have multiple discussion on the same topic.

Regards,

Daniel

mvp_badge
MVP

I think he found out exactly as you said 😁.

@Daniël Kuhlmann Sorry i did ask it there and i had to wait for weeks for an reply.. so i started a new discussion because i still have no answer to my question

I'll try to explain here again.

I'm trying to make an xml out of a record in database so i use RecordToXml, in the xml i need to add prefixes like xmlns:cac="" and xmlns:cbc="" .. 

In the example in the other post i downloaded the solution from Afonso Carvalho and i learned how to define the config for the xml but didn't find the solution to add the prefixes. But in the example i see this : <RecordList xmlns:xxx="http://namespace.com/test" xmlns:n1="http://namespace.com/test2" xmlns:n2="http://namespace.com/test3" > 

So i asked where did he put this in code?

This is an example of what the xml should look like : https://github.com/OpenPEPPOL/peppol-bis-invoice-3/blob/master/rules/examples/base-example.xml


Error @ outsystems : 'cbc' is an undeclared prefix. Line 1, position 74. 

Hoping for a solution..

Greets

mvp_badge
MVP

I don't have a solution, if I would I would have replied.

mvp_badge
MVP

I noticed the question wasn't linked to the component, which means those with knowledge on this topic probably didn't see it. I linked it now, so hopefully you can get an answer now.

I found the solution for the namespaces.

I added this to the top of the Invoice an i get this result

That's what we wanted.

New problem: 

we have to add prefixes to every node and child to the xml

Example: 

This point i can only add cac to the accountingsupplierParty but the child nodes lik party endpoint i can't give them cac or cbc..

This is the config i have for the prefixes (only for first line elements)

How can i configure the config that it can add cbc and cac to child nodes??

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.