Expand my Community achievements bar.

The first preview of our new Community upgrade is live - check it out now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Using node library for XML & Content Nodes

Avatar

Former Community Member

I'm trying to write a workflow process which reads the value of a node in a XML file and then writes it

to a content node with various properties.

 

My problem is when reading the XML im using the  org.w3c.dom.Node library

when writing or finding a node on the JCR i'm using import javax.jcr.Node library

 

What do i do here? Do i explicitly create the specific node here? I.E ->  org.w3c.dom.Node node = nodeList.item();

1 Accepted Solution

Avatar

Correct answer by
Level 4

Yes, pls. use full qualified path while declaring the variable ( eg. javax.jcr.Node lNode = .... ) instead of importing them.

View solution in original post

4 Replies

Avatar

Community Advisor

you have to use javax.jcr.Node api to create node and set its property. 

Avatar

Former Community Member

Mshajiahmed wrote...

you have to use javax.jcr.Node api to create node and set its property. 

 


Sorry I should have clarified...

I meant to ask since both those packages name their classes "Node" it creates a conflict. However each class is used for different applications.

Thanks.

Avatar

Level 10

When using Node in java app lohic, fully quailify the object so AEM knows which object you want to use.

Avatar

Correct answer by
Level 4

Yes, pls. use full qualified path while declaring the variable ( eg. javax.jcr.Node lNode = .... ) instead of importing them.