Hi,
I am currently struggling to narrow down an issue caused while converting String to XML and then attempting to extract data via XPath:
Hi,
I stumbled across this error which did not appear using the default row based backend. There is another error thrown before which did make no sense to me as the XPath Config did not exported anything of the type int but only node cells, though. The Xpath also comes right after the node which did throw the error in question but I include it just for the greater picture.
ERROR XPath 3:1178 Execute failed: class org.knime.core.data.xml.XMLCell cannot be cast to class java.l…
The idea is that the schema might be at fault and in order to verify the XML in bulk, I was in search for a XML validator node but only found that one:
This only works with a special data input type of “URI Object” but not XML with XML contained within a column. Therefore I’d like to suggest to create a node which helps validating XML.
Best
Mike
ScottF
August 29, 2023, 8:28pm
2
Nice suggestion! I suspect you will get more than a few votes for this one
Maybe not just the XSD schema but also against XML Namespaces like the following example XML of XMP Meta Data?
<?xml version="1.0" encoding="UTF-8"?>
<x:xmpmeta x:xmptk="Adobe XMP Core 4.2-c020 1.124078, Tue Sep 11 2007 23:21:40 "
xmlns:x="adobe:ns:meta/">
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description aux:Firmware="1.1.4" aux:FlashCompensation="0/1" aux:ImageNumber="0" aux:Lens="28-75mm" aux:LensID="161" aux:LensInfo="28/1 75/1 0/0 0/0" aux:LensSerialNumber="0000000000" aux:SerialNumber="033024023928" crs:AlreadyApplied="True" crs:BlueHue="0" crs:BlueSaturation="0" crs:Brightness="0" crs:CameraProfile="Embedded" crs:CameraProfileDigest="D6AF5AEA62557FCE88BC099788BBD3CC" crs:ChromaticAberrationB="0" crs:ChromaticAberrationR="0" crs:Clarity="+46" crs:ColorNoiseReduction="0" crs:Contrast="0" crs:ConvertToGrayscale="False" crs:CropAngle="-0.809209" crs:CropBottom="0.902284" crs:CropConstrainToWarp="0" crs:CropHeight="3002" crs:CropLeft="0.076825" crs:CropRight="0.907381" crs:CropTop="0.096908" crs:CropUnit="0" crs:CropWidth="4502" crs:Defringe="0" crs:Exposure="+0.26" crs:FillLight="49" crs:GrainAmount="0" crs:GreenHue="0" crs:GreenSaturation="0" crs:HasCrop="True" crs:HasSettings="True" crs:HighlightRecovery="67" crs:HueAdjustmentAqua="0" crs:HueAdjustmentBlue="0" crs:HueAdjustmentGreen="0" crs:HueAdjustmentMagenta="0" crs:HueAdjustmentOrange="0" crs:HueAdjustmentPurple="0" crs:HueAdjustmentRed="0" crs:HueAdjustmentYellow="0" crs:IncrementalTemperature="0" crs:IncrementalTint="0" crs:LensManualDistortionAmount="0" crs:LensProfileEnable="0" crs:LensProfileSetup="LensDefaults" crs:LuminanceAdjustmentAqua="0" crs:LuminanceAdjustmentBlue="0" crs:LuminanceAdjustmentGreen="0" crs:LuminanceAdjustmentMagenta="0" crs:LuminanceAdjustmentOrange="0" crs:LuminanceAdjustmentPurple="0" crs:LuminanceAdjustmentRed="0" crs:LuminanceAdjustmentYellow="0" crs:LuminanceSmoothing="0" crs:ParametricDarks="0" crs:ParametricHighlightSplit="75" crs:ParametricHighlights="+32" crs:ParametricLights="0" crs:ParametricMidtoneSplit="50" crs:ParametricShadowSplit="25" crs:ParametricShadows="-12" crs:PerspectiveHorizontal="-1" crs:PerspectiveRotate="0.0" crs:PerspectiveScale="100" crs:PerspectiveVertical="0" crs:PostCropVignetteAmount="-36" crs:PostCropVignetteFeather="50" crs:PostCropVignetteHighlightContrast="46" crs:PostCropVignetteMidpoint="33" crs:PostCropVignetteRoundness="-42" crs:PostCropVignetteStyle="1" crs:ProcessVersion="5.7" crs:RedHue="0" crs:RedSaturation="+8" crs:Saturation="-8" crs:SaturationAdjustmentAqua="0" crs:SaturationAdjustmentBlue="0" crs:SaturationAdjustmentGreen="0" crs:SaturationAdjustmentMagenta="0" crs:SaturationAdjustmentOrange="-1" crs:SaturationAdjustmentPurple="0" crs:SaturationAdjustmentRed="-22" crs:SaturationAdjustmentYellow="+8" crs:ShadowTint="0" crs:Shadows="0" crs:SharpenDetail="25" crs:SharpenEdgeMasking="72" crs:SharpenRadius="+1.0" crs:Sharpness="59" crs:SplitToningBalance="0" crs:SplitToningHighlightHue="0" crs:SplitToningHighlightSaturation="0" crs:SplitToningShadowHue="0" crs:SplitToningShadowSaturation="0" crs:ToneCurveName="Linear" crs:Version="6.2" crs:Vibrance="+10" crs:VignetteAmount="0" crs:WhiteBalance="As Shot" exif:ApertureValue="2970854/1000000" exif:CustomRendered="0" exif:DateTimeDigitized="2015-04-08T09:06:03.00+02:00" exif:DateTimeOriginal="2015-04-08T09:06:03.00+02:00" exif:ExifVersion="0230" exif:ExposureBiasValue="0/1" exif:ExposureMode="1" exif:ExposureProgram="1" exif:ExposureTime="1/160" exif:FNumber="28/10" exif:FocalLength="75/1" exif:FocalPlaneResolutionUnit="2" exif:FocalPlaneXResolution="5472000/1436" exif:FocalPlaneYResolution="3648000/956" exif:MaxApertureValue="3/1" exif:MeteringMode="5" exif:PixelXDimension="3002" exif:PixelYDimension="4502" exif:RecommendedExposureIndex="50" exif:SceneCaptureType="0" exif:SensitivityType="2" exif:ShutterSpeedValue="7321928/1000000" exif:WhiteBalance="0" photoshop:LegacyIPTCDigest="BFD22B532681513B6BB37F089176F7AC" rdf:about="" tiff:ImageLength="4502" tiff:ImageWidth="3002" tiff:Make="Canon" tiff:Model="Canon EOS 6D" tiff:ResolutionUnit="2" tiff:XResolution="240/1" tiff:YResolution="240/1" xap:CreateDate="2015-04-08T09:06:03.00+02:00" xap:CreatorTool="Adobe Photoshop Lightroom" xap:ModifyDate="2015-04-08T11:36:04+02:00" xap:Rating="4" xapRights:Marked="True" xapRights:WebStatement=""
xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:exif="http://ns.adobe.com/exif/1.0/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
xmlns:xap="http://ns.adobe.com/xap/1.0/"
xmlns:xapRights="http://ns.adobe.com/xap/1.0/rights/">
<exif:ISOSpeedRatings>
<rdf:Seq>
<rdf:li>50</rdf:li>
</rdf:Seq>
</exif:ISOSpeedRatings>
<exif:Flash exif:Fired="False" exif:Function="False" exif:Mode="2" exif:RedEyeMode="False" exif:Return="0"></exif:Flash>
<dc:creator>
<rdf:Seq>
<rdf:li></rdf:li>
</rdf:Seq>
</dc:creator>
<dc:rights>
<rdf:Alt>
<rdf:li xml:lang="x-default"></rdf:li>
</rdf:Alt>
</dc:rights>
<dc:subject>
<rdf:Bag>
<rdf:li>tag 1, tag 2</rdf:li>
</rdf:Bag>
</dc:subject>
<crs:ToneCurve>
<rdf:Seq>
<rdf:li>0, 0</rdf:li>
<rdf:li>255, 255</rdf:li>
</rdf:Seq>
</crs:ToneCurve>
<crs:GradientBasedCorrections>
<rdf:Seq>
<rdf:li>
<rdf:Description crs:CorrectionActive="true" crs:CorrectionAmount="1.000000" crs:LocalBrightness="-0.161000" crs:LocalClarity="-0.821000" crs:LocalContrast="0.000000" crs:LocalExposure="0.000000" crs:LocalSaturation="0.000000" crs:LocalSharpness="0.000000" crs:LocalToningHue="240.000000" crs:LocalToningSaturation="0.000000" crs:What="Correction">
<crs:CorrectionMasks>
<rdf:Seq>
<rdf:li crs:FullX="0.648456" crs:FullY="0.886053" crs:MaskValue="1.000000" crs:What="Mask/Gradient" crs:ZeroX="0.558366" crs:ZeroY="0.450461"></rdf:li>
</rdf:Seq>
</crs:CorrectionMasks>
</rdf:Description>
</rdf:li>
<rdf:li>
<rdf:Description crs:CorrectionActive="true" crs:CorrectionAmount="1.000000" crs:LocalBrightness="-0.143000" crs:LocalClarity="-0.625000" crs:LocalContrast="0.000000" crs:LocalExposure="0.000000" crs:LocalSaturation="0.000000" crs:LocalSharpness="0.000000" crs:LocalToningHue="240.000000" crs:LocalToningSaturation="0.000000" crs:What="Correction">
<crs:CorrectionMasks>
<rdf:Seq>
<rdf:li crs:FullX="0.766335" crs:FullY="0.162813" crs:MaskValue="1.000000" crs:What="Mask/Gradient" crs:ZeroX="0.652886" crs:ZeroY="0.571186"></rdf:li>
</rdf:Seq>
</crs:CorrectionMasks>
</rdf:Description>
</rdf:li>
<rdf:li>
<rdf:Description crs:CorrectionActive="true" crs:CorrectionAmount="1.000000" crs:LocalBrightness="0.250000" crs:LocalClarity="-0.893000" crs:LocalContrast="0.000000" crs:LocalExposure="0.000000" crs:LocalSaturation="0.000000" crs:LocalSharpness="0.000000" crs:LocalToningHue="240.000000" crs:LocalToningSaturation="0.000000" crs:What="Correction">
<crs:CorrectionMasks>
<rdf:Seq>
<rdf:li crs:FullX="0.077976" crs:FullY="0.326289" crs:MaskValue="1.000000" crs:What="Mask/Gradient" crs:ZeroX="0.214516" crs:ZeroY="0.370260"></rdf:li>
</rdf:Seq>
</crs:CorrectionMasks>
</rdf:Description>
</rdf:li>
</rdf:Seq>
</crs:GradientBasedCorrections>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>