cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
john_madden
Level VI

XPath Query() and XML namespaces

I have a bunch of XML documents that I want to put into a data column. I want to use XPath expressions to pull out values from them, by appending columns that contain formulas that make use of the XPath Query() function.

 

Some of my documents have XML-namespace qualified element names. For example, one might look like this:

 

<?xml version="1.0" encoding="UTF-8"?>
<synopsis xmlns="http://www.cap.org/pert/2009/01/" xmlns:colon="http://www.cap.org/pert/2009/01/colon/">
    <clinical>
        <clinicalFindings>
            <clinicalFinding value="mass"/>
        </clinicalFindings>
    </clinical>
    <specimen>
        <procedures>
            <colon:procedure value="segmental colectomy"/>
        </procedures>
        <sites>
            <colon:site value="cecum" primary="true"/>
        </sites>
        <tumorLocations>
            <colon:tumorLocation value="cecum"/>
        </tumorLocations>
    </specimen>
</synopsis>

It appears that Xpath Query() can't understand namespace-qualified names. It gives an XPath error for an XPath of  "/synopsis/specimen/sites/colon:site/@value" or of "/default:synopsis/default:specimen/default:sites/colon:site/@value".

 

If I remove all namespace qualification, it seems to do okay. Unfortunately for me, my documents use XML namespaces a lot.

 

 

Does anyone have experience with the XPath Query() function? Is there a way to make it XML-namespace aware?

0 REPLIES 0

Recommended Articles