[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Namespace and Schema
Can anyone help me, please? I am creating a dynamic XML doc. I should generate the following out: <?xml version="1.0" ?> <MessageFile xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.mysite.com/Message" xmlns:Message="http://www.mysite.com/Message"> I have tried to implement it in different way, but they are not working.. but I don't understand why. I tried this: DOM_DOMImplementation implDoc; DOM_Document Document = implDoc.createDocument( XMLString::transcode("http://www.w3.org/2001/XMLSchema"), XMLString::transcode("xmlns:Message") ,0x00); Also I tried this: DOM_Document Document = DOM_Document::createDocument(); DOM_Element Root = Document.createElementNS(XMLString::transcode("http://www.w3.org/2001/XMLSchema"), XMLString::transcode("xmlns:Message")); Document.appendChild(Root); It is failing this error: Signal SIGABRT raised (abnormal termination). I know that Root isn't Node, but if I create element without NS, it works. My idea here was that When I try to get that information to show it I will call getAttributes, but I think that is wrong because I don't set that attributes. I am confused about Namespace and URI, I understand that namespace could be a prefix, it could be linked to namespace, in my case it is "Message". The URI is http://www.w3.org/2001/XMLSchema. I am not sure if it is correct. Also If I should implement it in some way I wrote above. I can use until DOM Level 2.0 Core Specification. ( XML4C - ( DOM 1.0, DOM 2.0. SAX 1.0, SAX 2.0, Namespaces, and W3C's XML Schema recommendation version 1.0.) I hope someone can help me! Thank you very much! -- _______________________________________________ http://mail.mexico.com ¡Disponible Ya! Utiliza el Outlook y Outlook Express para bajar tus correos por solo US$24.95 al año Now available! Download your mail into your computer with Outlook and Outlook Express US$24.95/yr Powered by www.M3xico.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|