Hello,

  Is there any way to set/use namespaces on the xml elements and
attributes of a dataset?  Also, is there any documentation on what you
can do with an LzNamespace? (I've found none in some searching.)

  Right now I'm using a LzDataset to add nodes to, and then calling
serialize() to get the content to stuff in a soap message.  I can add my
own "xmlns:blah" attributes in various places and then add nodes with
namespace-qualified names, eg.:

        dp.setNodeAttribute("xmlns:ns0", "http://tempuri.org/foo";);
        dp.setNodeAttribute("xmlns:ns1", "http://tempuri.org/bar";);
        dp.setNodeAttribute("ns1:version", "1.0");
        dp.setNodeName("ns0:SomeThing");
        dp.addNode("Name", name);   <!-- unqualified name -->
        dp.addNode("ns0:Description", description);
        dp.addNode("ns1:Color", color);

But then you have to track in the app the specific namespace identifier
in use, and what elements/attributes need which.  If you eg. change your
node pointer to somewhere else, you have to know what namespace
identifier hierarchy you're in at the time.  Eg. when working with wsdl,
it seems common to have a "tns:" identifier for the wsdl, and a
different "tns:" for the schema within the wsdl.  It seems like it would
be useful, and more natural with xml, to have a handle to the set and
access the namespace of elements/attributes of a dataset (perhaps you
can, and I've just not found it).  Maybe also the ability to specify the
namespace identifier used for serialize(), or to let it be auto-created
(default).

Thanks,
Jesse

-- 
Jesse Norell
Kentec Communications, Inc.
[EMAIL PROTECTED]

Reply via email to