Hi guys,
I've spent a while puzzling this, but after reading the v. useful
BasicLibraries.pdf and searching the web I'm still stumped. I'd be very
grateful for any pointers:
I want to produce an XML document where the top node refers to its schema:
<RecordUpdates xmlns="
http://www.foo.com"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="...">
</RecordUpdates>
How do I get the xsi:schemaLocation bit in there? Is it just an attribute?
I tried this:
| xml |
xml := XML.Document new.
xml
addNode: ((XML.Element tag: 'MyNode') attributes: (Array
with: (XML.Attribute name: 'xsi:schemaLocation' value: '...'))).
xml root namespaces: ((Dictionary new)
at: '' put: '
http://www.foo.com'; at: 'xsi' put: '
http://www.w3.org/2001/XMLSchema-Instance'; yourself).
But then the xsi:schemaLocation bit comes out first, before the namespace
stuff. I don't even know if it matters. Before that I thought the
xsi:schemaLocation bit could be added to the namespace dictionary, but then
it comes out as xmlns:xsi:schemaLocation which is wrong, isn't it?
Any help, sarcastic or otherwise, gratefully recieved.
... John
--
View this message in context:
http://forum.world.st/Noob-XML-question-tp3704472p3704472.htmlSent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc