Hello!
I work on a data migration project and try to convert data from a tabular file to an XML-format. When I run my job i extract a row from the table like the second line below:
TYPE,level_type1,LINE,level_type2
C,1,AC,2
And want to create an XML output like this:
<Product_class>
<name>C</name>
<level_type>1</level_type>
</Product_class>
<Product_class>
<name>AC</name>
<level_type>2</level_type>
</Product_class>
I did this by generating XPath expressions in the XMLmetadataimporter.exe and load the table definitions into the XML output stage, the column tab like this:
Column name,.......................,Description
TYPE,....................................,/Product_class/name/text()
level_type1,..........................,/Product_class/level_type/text()
LINE,.....................................,/Product_class/name/text()
level_type2,..........................,/Product_class/level_type/text()
The output I get is:
<Product_class>
_<name>C AC </name>
_<level_type>1 2</level_type>
</Product_class>
Does anyone knows the correct way to write the X-Paths?
/Dan
XPath problem when transforming flat file to XML
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 4
- Joined: Wed Jul 26, 2006 10:19 am
Re: XPath problem when transforming flat file to XML
Hello All,
Does anybody got any workaround for this kind of XML file generation.
If so, let me know. i am also facing same kind of problem.
Thanks in advance.
Does anybody got any workaround for this kind of XML file generation.
If so, let me know. i am also facing same kind of problem.
Thanks in advance.
Aquilis