Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
For XML files, the syntax of Data Items can be as follows:
Static values
You can indicate that an Item should always evaluate to a specific value by prefixing that value with "0,"
EX: Item=0,static text
Dynamic values
You can also use the internal XPath expression evaluator to pull in data from the file dynamically.
Given the XML data:
<Orders>
<Order>
[...]
<Origin>
<Name>CXT Software</Name>
<Address>3030 N. Central Ave</Address>
<Suite>708</Suite>
<City>Phoenix</City>
<State>AZ</State>
<PostalCode>85012</PostalCode>
[...]
</Origin>
[...]
</Order>
[...]
</Orders>
You can pull in information by specifying the XML Node using XPath expressions.
EX:
OrderNode=/Orders/Order
OriginName=Origin/Name
OriginAddress=Origin/Address
OriginSuite=Origin/Suite
OriginCity=Origin/City
OriginState=Origin/State
OriginZip=Origin/PostalCode
Given the XML data:
<Orders>
<Order>
[...]
<Origin
Name="CXT Software"
Address="3030 N. Central Ave"
Suite="708"
City="Phoenix"
State="AZ"
PostalCode="85012" />
[...]
</Order>
[...]
</Orders>
You can pull in information by specifying the XML node using XPath expressions, separating the node from the property with the '$' character.
EX:
OrderNode=/Orders/Order
OriginName=Origin$Name
OriginAddress=Origin$Address
OriginSuite=Origin$Suite
OriginCity=Origin$City
OriginState=Origin$State
OriginZip=Origin$PostalCode
Given the XML data:
<Orders>
<Order>
[...]
<comment type="origin">Room 200B</comment>
<comment type="destination">Leave with front desk</comment>
[...]
</Order>
[...]
</Orders>
You can use a conditional XPath expression.
EX:
OrderNode=/Orders/Order
OriginComments=comment[@type="origin"]
DestComments=comment[@type="destination"]
Given the XML data:
<Orders>
<Order>
<TrackingInfo>
<RouteID>WW314159</RouteID>
<StopID>Z112358</StopID>
</TrackingInfo>
</Order>
</Orders>
XML fields delimited files, data is referenced by the 1-based field index position.
Given the data:
CXT Software,3030 N. Central Ave.,Ste 708,Phoenix,AZ,85012,...
You would configure X Import as follows:
Paste code macro |
---|
OriginName=1
OriginAddress=2
OriginSuite=3
OriginCity=4
OriginState=5
OriginZip=6 |
If the field value may contain the same character as your delimiter, the value must be surrounded with the Qualifier character (double-quote by default).
Fields may also be concatenated by separating the values fields with a comma. If one or more XPath expressions need to be combined with static data, surround the static data with quotes.
EX:
OrderNode=/Orders/OrderStatic text can be included by surrounding it with double-quotes.
Given the data:
1038,9784,CXT Software,...
X Import can be setup to include the Route and Stop IDs in the order's
Reference1 field:
Paste code macro |
---|
Reference1="RouteID: ", |
1," |
, StopID: " |
On This Page:
Table of Contents | ||
---|---|---|
|
,2 |
You can concatenate a comma into a concatenated string. This can be done using “,” or {COMMA} as the element to concatenate.
Given the date:
FirstName,LastName
Setting Referene1=2,”,”,1 or 2,{COMMA},1 will result in: “LastName, Firstname” in the reference 1 field
Related Articles:
Child pages (Children Display) | ||
---|---|---|
|
Search related import documentation
Live Search | ||||
---|---|---|---|---|
|