Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

iXML DOM Parser Problem

Former Member
0 Likes
675

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
587

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

2 REPLIES 2
Read only

Former Member
0 Likes
588

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

Read only

0 Likes
587

I kind of tired the same thing and got it working. Thanks a lot for the post.

Naveen