infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
XML Question for a XML newbie
Jerry Tilsley
All,
I'm a newbie when it comes to processing XML through Cloverleaf. My question is really simple, can you not access the attributes defined in the XSD within the Xlate tool?
Thanks,
Jerry
Find more posts tagged with
Clovertech
Comments
Charlie Bursell
Simple question, simple answer: YES
Just expand the addresses in the Xlate tool
Jerry Tilsley
I tried that, but I only get the nodes and child nodes, but not the attributes of nodes. I'm on Cloverleaf 6.02 on Redhat 6.x.
Thanks,
Jerry
Jerry Tilsley
Example of the XML is:
John
25
.....
I'm trying to pull the gender and pass it along in a VRL. The and Nodes are pulled in with no problem. This is just something I'm playing with to work with all the elements in XML, far from a real world example.
Thanks!
Charlie Bursell
You should be able to do that. Depends on how the schema is defined
Charlie Bursell
I should have mentioned that if you run your test file against the schema using hcixmltest you will see the address of the attribute. For example, I have a simple XML file and run the test, I see:
C:cloverleafcis6.0integratorcbtest>hcixmltest -p ship shipOrder shipOrder.xml
MESSAGE 1
shiporder.&orderid: >889923<
shiporder.orderperson.#text: >John Smith<
shiporder.shipto.name.#text: >Ola Nordmann<
shiporder.shipto.address.#text: >Langgt 23<
shiporder.shipto.city.#text: >4000 Stavanger<
shiporder.shipto.country.#text: >Norway<
shiporder.item(0).title.#text: >Empire Burlesque<
shiporder.item(0).note.#text: >Special Edition<
shiporder.item(0).quantity.#text: >1<
shiporder.item(0).price.#text: >10.90<
shiporder.item(1).title.#text: >Hide your heart<
shiporder.item(1).quantity.#text: >1<
shiporder.item(1).price.#text: >9.90<
Note that is the attribute for the node shipOrder"
<shiporder orderid="889923"
If I look at it in Xlate I can access it under shipOrder at address &ordered
Hope this helps else send me a mail and I can send you an example
Jerry Tilsley
Ok, so I recompiled the XML and now in the test tool the attribute shows for the data. BUT, the xlate tool still does not show the field.
Thanks!
Jerry
Jerry Tilsley
Alright, I got this to work. As I said, I'm a newbie to XML. I was compiling it and forgetting to choose the root level which caused the Xlate to not pick up the attribute. All is working as expected now.
Thanks Charlie for the help!
Jerry