Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

String Value of Barcode


Not applicable
We're using Code128 barcodes with a 14 character identifier. I've been able to get the xml of the barcode using decode, but is there an easier way to get the value from the xml than using xpath? I just want a string with a value like 12345678001002. This is the xml result:<br /><br />><?xml version="1.0" ?> <br /> <xb:scanned_image path="pdf" version="1.0" xmlns:xb=""><br /> <xb:decode><br /> <xb:date>2008-06-16T14:36:30.670-04:00</xb:date> <br /> <xb:host_name> </xb:host_name> <br /> <xb:status type="success"><br /> <xb:message /> <br /> </xb:status><br /> </xb:decode><br /> <xb:barcode id="1"><br /> <xb:header symbology="code128"><br /> <xb:location page_no="1"><br /> <xb:coordinates><br /> <xb:point x="0.0" y="0.0" /> <br /> <xb:point x="1.0" y="0.0" /> <br /> <xb:point x="1.0" y="1.0" /> <br /> <xb:point x="0.0" y="1.0" /> <br /> </xb:coordinates><br /> </xb:location><br /> </xb:header><br /> <xb:body><br /> <xb:content encoding="utf-8">666666002004</xb:content> <br /> </xb:body><br /> </xb:barcode><br /></xb:scanned_image><br /><br />If I do try to use extractToXml (and I don't have any deliminated data) I get an invalidOperationException, saying <br /><br />>" System.Xml.XmlException: The 'document' start tag on line 1 does not match the end tag of 'barcode'. Line 2, position 36. "
1 Reply


Not applicable
The extractToXML service should be used on data that is extracted from the 2D barcodes that have been encoded using the tab-delimited format including field names.

In your case, simply use the Decode service and then use the Set service to move the value from the //content element into your variable.