‎2005 Jun 29 10:53 PM
Hi All,
We are using iXML parser for creating a XML structure, where root node is supposed to have defined namespace prefix and uri .
<<b>ns:</b>AddWithIndexObjects <b>xmlns:ns="http://tempuri.com/"</b>>
<FileNetDoc />
</<b>ns:</b>AddWithIndexObjects>
parent = odocument->create_simple_element_ns(
name = 'AddWithIndexObjects'
prefix = 'ns'
URI = 'http://tempuri.org/'
parent = odocument ).
no matter what me do the structure being generated has no uri information, but prefix is being added
<<b>ns:</b>AddWithIndexObjects >
<FileNetDoc />
</<b>ns:</b>AddWithIndexObjects>
Has anyone encountered this problem or have a work around.
Thanks,
Naveen
‎2005 Jun 30 5:44 AM
Hi, please look my reply code as following:
ELEMENT = DOCUMENT->CREATE_SIMPLE_ELEMENT_NS(
NAME = 'AddWithIndexObjects'
PREFIX = 'ns'
PARENT = DOCUMENT ).
ATTRIBUTE = DOCUMENT->create_namespace_decl(
NAME = 'XMLNS'
PREFIX = 'ns'
URI = 'http://tempuri.com/'
).
ELEMENT->SET_ATTRIBUTE_NODE_NS(
NEW_ATTR = ATTRIBUTE
).
Pleaes aware that the URI in CREATE_SIMPLE_ELEMENT_NS is not for you to create namespace, if you want to create a namespace defination, use create_namespace_decl.
Help it will be helpful, thanks a lot
‎2005 Jun 30 5:44 AM
Hi, please look my reply code as following:
ELEMENT = DOCUMENT->CREATE_SIMPLE_ELEMENT_NS(
NAME = 'AddWithIndexObjects'
PREFIX = 'ns'
PARENT = DOCUMENT ).
ATTRIBUTE = DOCUMENT->create_namespace_decl(
NAME = 'XMLNS'
PREFIX = 'ns'
URI = 'http://tempuri.com/'
).
ELEMENT->SET_ATTRIBUTE_NODE_NS(
NEW_ATTR = ATTRIBUTE
).
Pleaes aware that the URI in CREATE_SIMPLE_ELEMENT_NS is not for you to create namespace, if you want to create a namespace defination, use create_namespace_decl.
Help it will be helpful, thanks a lot
‎2005 Jun 30 1:19 PM
I kind of tired the same thing and got it working. Thanks a lot for the post.
Naveen