JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
Well,
I've noticed a little something amusing in the VB Default XML handling and I was wondering how to eradicate this behavior.
I've designed an XML Schema (which is built in to my resources and provided for verification), and i' utilize a dataset to store the values from the XML document while in memory, because datasets are rather easy to use and they come built in with relationship enforcement which can be helpful.
However, their default save/load is not as desired so i wrote my own, utilizing my knowledge of XML, and the XML vb wrapper library. So,
I create the document adding elements and attributes as necessary and this is what I get:
Seems okay, never fails on the schema validation, never causes any hiccups, but the VB IDE Intellisense reads that as the usersettings having a warning with regards to the RexamSettings.xsd schema file.
I remove the usersettings attribute section: xmlns="" and the warning goes away. NOw, when I create that element as a child to the RexamSettings "DocumentElement", I do not provide a NameSpaceURI, but for some reason when it comes time to save the document to the xmlwriter, it adds a "blank" Namespace attribute to the element. How can I stop this behavior?
Thanks
I've noticed a little something amusing in the VB Default XML handling and I was wondering how to eradicate this behavior.
I've designed an XML Schema (which is built in to my resources and provided for verification), and i' utilize a dataset to store the values from the XML document while in memory, because datasets are rather easy to use and they come built in with relationship enforcement which can be helpful.
However, their default save/load is not as desired so i wrote my own, utilizing my knowledge of XML, and the XML vb wrapper library. So,
I create the document adding elements and attributes as necessary and this is what I get:
VB.NET:
<?xml version="1.0" encoding="utf-8"?>
<RexamSettings xmlns="http://tempuri.org/RexamSettings.xsd">
<usersettings ID="1" user_name="sk" ua="False" xmlns="">
</usersettings>
</RexamSettings>
Seems okay, never fails on the schema validation, never causes any hiccups, but the VB IDE Intellisense reads that as the usersettings having a warning with regards to the RexamSettings.xsd schema file.
I remove the usersettings attribute section: xmlns="" and the warning goes away. NOw, when I create that element as a child to the RexamSettings "DocumentElement", I do not provide a NameSpaceURI, but for some reason when it comes time to save the document to the xmlwriter, it adds a "blank" Namespace attribute to the element. How can I stop this behavior?
Thanks