

Notepad++ has a ton of useful plugins, you can use the XML tools for building and testing XPath queries. Tip: Use Notepad++ Plugins to Get Started Once we have that node, we can extract its inner text, which should be ‘Isabelle Ringing’įor a tutorial on XPath syntax, you could try W3Schools.From that node, descend one more level to the child node ‘ Value‘.With a Name having a value of ‘ Audiologist‘.Find a grandchild node named ‘ EntityPropertyOfString‘.From there, find the child XML node named ‘ ArrayOfEntityPropertyOfString‘.Start at the root, represented by the forward slash ‘/’.ArrayOfEntityPropertyOfString/EntityPropertyOfString/Value In fact, the XPath query to extract her looks like this: The tool to use is XPath, which is designed for that very purpose. For example, let’s say I need the name of our Audiologist, ‘Isabelle Ringing’, for our partner. My task: extract a couple of these fields and send the values to our eCommerce partner. Here’s a sample, with the fields whimsically renamed to protect everyone’s privacy:

Our ERP allows us to create custom fields, as many as we want it stores our custom fields in XML format. You might find it useful too! My Task: Extracting Custom Fields from XML To make it easier next time, I’m saving my code where I can find it again quickly. So, I had to struggle a bit to make it work this time around. I learned XPath a long time ago, and haven’t used it lately. If you’re like me, you use a zillion different techniques, but some only rarely. Posted on SeptemUpdated on September 9, 2014
