Hi Krankurs,

Krankurs Leonid <[EMAIL PROTECTED]> writes:

> Hi Nadika,
>
> Thanks for the quick response
>
> 1. I still have a question
>
> How to create an element with namespace xmlns=""? 
> like
> <myElement name="myName" xmlns="">

Fixed the little problem we had in axiom, You can write empty
default namespace by passing "NULL" argument to the
axiom_namespace_create function.

<snippet>
    int status = 0;
    axiom_element_t *ele1 = NULL;
    axiom_node_t *node1 = NULL;
    axiom_attribute_t *attr1 = NULL;
    axiom_namespace_t *ns1 = NULL;
    axiom_output_t *om_output = NULL;
    axiom_xml_writer_t *writer = NULL;

    ns1 = axiom_namespace_create(environment, NULL, NULL);
   /*------ ----------------uri and prefix----^^^^--^^^^---*/
    ele1 = axiom_element_create(environment, NULL, "myElement", ns1,
    &node1);
    attr1 = axiom_attribute_create(environment, "name", "myName", NULL);

    AXIOM_ELEMENT_ADD_ATTRIBUTE(ele1, environment, attr1, node1);

    writer = axiom_xml_writer_create_for_memory(environment, NULL,
    AXIS2_TRUE, 0, AXIS2_XML_PARSER_TYPE_BUFFER);
    om_output = axiom_output_create(environment, writer);
    status = AXIOM_NODE_SERIALIZE(node1, environment , om_output);
</snippet>

thanks,
Dinesh





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to