Platform
Learn
Community
Support
Partner Center
Sign up
or
Log in
logout
Account Settings
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Learn
Training
Documentation
Evaluation Guide
What's New
Community
Home
Forums
Forge
Ideas
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Sign up
or
Log in
Home
Forums
Forge
Ideas
Members
Dear ,
What would improve your OutSystems Community experience? Let us know by taking this 2-minute survey.
Pick up the survey
Community
›
Forums
›
Technology & Integration
Serialization_XmlToRecordList
Community
›
Forums
›
Technology & Integration
Serialization_XmlToRecordList
New Post
New Post
João Inácio
Posted on 2010-04-29
João Inácio
Rank: #619
Posted on 2010-04-29
xml_testes.oml
Hi guys,
I'm trying to insert a XML file in my DB. Using Serialization_XmlToRecordList but since i'm a novice in XML I'm having some difficulties using this action.
This action has two arguments one to insert the "XML" text, and the other "RecordList" an ?object?. i've tried to use ToObject(my_recordList_structure_variable) but no success:(. Can any one help me with this ?
Attached to this post, is a too easy example for you "XML masters". Modify at your own will, so i can take such example.
PS: This code is from other post, but i will use it for this test, because is simple.
<?xml version="1.0" encoding="UTF-8"?>
<DBExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
< S_WARRANT_ISSUE_BATCH >
<MessageNumber>22</MessageNumber>
< /S_WARRANT_ISSUE_BATCH >
</DBExport>
Fernando Sousa
Posted on 2010-04-29
Fernando Sousa
Rank: #583
Posted on 2010-04-29
Solution
Hi João,
Unfortunatly, I believe that the XML extension available in the AgileNetwork only supports entity serialization (entity records), not structures... I think that you can serialize any type of record (entity or structure) into XML, but only entity records will be convertet back from XML.
Solution
João Inácio
Posted on 2010-04-29
João Inácio
Rank: #619
Posted on 2010-04-29
Solution
hi Fernando. I can create an entity based on my xml file if need (to work), besides having a structure, will i achieve my main goal?
main goal - Recieving XML file and save data in DB.
How is this done?
Anyone has one good example so a can learn with it?
Solution
Fernando Sousa
Posted on 2010-04-29
Fernando Sousa
Rank: #583
Posted on 2010-04-29
Solution
Sorry, perhaps I misunderstood your question. If you just want to upload an XML file and store it in the database, either in binary or plain-text format, you don't need to use the XML extension. Check out
this (plain-text)
and
this (binary)
posts.
If after uploading the XML file you want to parse it and store each node in specific fields in a table, maybe the best way is to use the XML extension and access each XML node using XPath, filling a record and then insert it in the database.
Solution
João Inácio
Posted on 2010-04-30
João Inácio
Rank: #619
Posted on 2010-04-30
Solution
I
want to parse and store
it.
I thought that action "Serialization_XmlToRecordList" could return a record list with the same record definition as the xml file. But if i've to access to
XML node and then fill a record and then insert it in the database, is more complex.
Can you put my example (attached file) to work? It would be a good example to start.
XML FILE
<?xml version="1.0" encoding="UTF-8"?>
<DBExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
< S_WARRANT_ISSUE_BATCH >
<MessageNumber>22</MessageNumber>
< /S_WARRANT_ISSUE_BATCH >
</DBExport>
Solution
Tiago Simões
Posted on 2010-05-06
Tiago Simões
Rank: #5
Posted on 2010-05-06
Solution
Hi João,
Take a look into this new component
XML Records
that might help you on that.
Cheers,
Tiago Simões
Solution
Quick Reply
attachment
Choose File
No file chosen
Submit
Login to reply
New Post
Available Forums
Technology & Integration
News and Announcements
Forge Discussions
Meta
Community Quick Guides
Usability
Installation Troubleshooting
Personal Environment Troubleshooting
Forum Notifications
Email Digest Settings
Loading...