Using node library for XML & Content Nodes | Community
Skip to main content
October 16, 2015
Solved

Using node library for XML & Content Nodes

  • October 16, 2015
  • 4 replies
  • 1064 views

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();

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by sumitc22

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

4 replies

Community Advisor
October 16, 2015

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

October 16, 2015

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.

smacdonald2008
Level 10
October 16, 2015

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

sumitc22Accepted solution
Level 4
October 16, 2015

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