Safe Net in XML

Dear Experts!

Sorry to bother you again, in MS access we have a safe net called Optional Explicit , this helps us to ensure that the code we write is correct , now what about XML do we have any and how do we end statements like below:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
</customUI>

foe example I want to add 10 tabs, 10 groups  and 10 controls , how do I end the statements . By the way is it true that if we store the XML statements in a table , then each statement like the one above will look like below:

PK                        RibbonName                XmlRibbon
1                          MyTab                            <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
2                          Mytab                             </customUI>

etc


Kindly assist

Regards

Chris
LVL 2
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
XML per se must be well-formed.  Well-formed mean the document is syntactically correct. You normally check this before processing XML in DOM mode or on the fly in stream mode. When it is not well-formed, processing stops and no data is used. The creator/source of the XML is responsible for well-formed XML.

Then there is also XML schema. A XML schema defines the structure and occurences of elements and data types. You use it to validate a well-formed XML file. When XML schema validation fails, the same from above applies: no further processing.

This means: Your table from above is nonsense, cause you would store invalid XML fragments per row. USysRibbons takes entire ribbon declarations, not fragments.

Further more, as it is about ribbons: See Ribbons for Access. Gunter's site is the best compendium and comes with some code samples and a practical ribbon builder.

But your implicit question answered: You would create and manipulate the UI XML in an appropriate XML editor. Many of them support XML validation for well-formed-ness and schema validation. You than only store a valid UI XML in the USysRibbons table.
0
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAuthor Commented:
Ok well said

Does this syntax go in one raw in a system table????????

PK                        RibbonName                XmlRibbon
1                          MyTab                            <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon startFromScratch="true"/></customUI>


Or two rows in a system table ???????????????

PK                        RibbonName                XmlRibbon
1                          MyTab                            <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
2                          Mytab                             </customUI>
0
ste5anSenior DeveloperCommented:
USysRibbons takes entire ribbon declarations, not fragments.
has already answered this.

USysRibbons is a table. Tables in a RDBMS take one row per entity.
0
Fabrice LambertFabrice LambertCommented:
The whole XML describing one ribbon goes in a single record in the USysRibbons table.
Splitting it over several records is a non-sens.

On the other hand, you can have multiple ribbons saved in the table.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAuthor Commented:
Thank you so much you have lifted my day !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.