Skip to main content

Hi , I am having problems getting the XMLFragmenter to produce any results if I add a predicate. I have tested the following on an xpath online tool and it works.

 Workspace/WorkspaceDefinition/DatasetDefinitions/DataElement/Children/DataElement/Namee.="PROMPT_wControlValve"] the online tool requires esri: to work.

 

I attach a snippet of the xml (an esri gdb workspace export).

Ideally I would like to return the parent DataElement of <Name>PROMPT_wControlValve</Name> but I would be happy to make any progress.

 

Thanks in advance

 

 

 


http://www.esri.com/schemas/ArcGIS/10.6

If you want to find the correct path, point the XMLFragmenter to a file, then you can use the ... button to navigate to the element you need in the file. Which in your case is I think

Workspace/WorkspaceDefinition/DatasetDefinitions/DataElement/Children/DataElement

You can then flatten the fragment and get the attributes. You will need to expose them after flattening. Can be done in the transformer or use the AttributeExposer.

 

Workspace/WorkspaceDefinition/DatasetDefinitions/DataElement/Children/DataElement

 

As an alternative, you might need to use the XMLXQueryExtractor, but that one has a steep learning curve.

 


If you want to find the correct path, point the XMLFragmenter to a file, then you can use the ... button to navigate to the element you need in the file. Which in your case is I think

Workspace/WorkspaceDefinition/DatasetDefinitions/DataElement/Children/DataElement

You can then flatten the fragment and get the attributes. You will need to expose them after flattening. Can be done in the transformer or use the AttributeExposer.

 

Workspace/WorkspaceDefinition/DatasetDefinitions/DataElement/Children/DataElement

 

As an alternative, you might need to use the XMLXQueryExtractor, but that one has a steep learning curve.

 

Thanks for the help. I follow that I can get the values by flattening etc. but is it not possible to get a specific value using the Â] notation? My goal is to get an xml fragment for a feature class, give it a new name and update the xml with it. The path I posted is a valid xpath and extracts the feature class name when used in an online tester using the same xml file as input. It just doesn’t work in the XMLFragmenter. (I  built the path using the interface). I would rather avoid getting a huge list of flattened attributes and have to extract the feature class (DataElement) element from that. 


Thanks for the help. I follow that I can get the values by flattening etc. but is it not possible to get a specific value using the [] notation? My goal is to get an xml fragment for a feature class, give it a new name and update the xml with it. The path I posted is a valid xpath and extracts the feature class name when used in an online tester using the same xml file as input. It just doesn’t work in the XMLFragmenter. (I built the path using the interface). I would rather avoid getting a huge list of flattened attributes and have to extract the feature class (DataElement) element from that.

Clear 🙂 I believe you have to use the XMLXQueryExtractor to do that. If you add the xml as sample file we can try and help to get the syntax right. Some of us (looking at @ebygomm​) are skilled enough to work with it.


Thanks for the help. I follow that I can get the values by flattening etc. but is it not possible to get a specific value using the [] notation? My goal is to get an xml fragment for a feature class, give it a new name and update the xml with it. The path I posted is a valid xpath and extracts the feature class name when used in an online tester using the same xml file as input. It just doesn’t work in the XMLFragmenter. (I built the path using the interface). I would rather avoid getting a huge list of flattened attributes and have to extract the feature class (DataElement) element from that.

Hi, thank for the help. I attach an example xml file with 2 Feature Datasets and a couple of Feature Classes in each. I would like to Extract the fragment for a specific Feature Class which I then rename and insert it back into the XML as an additional feature class.


The XML snippet seems to be missing.

 

 

 

 

 

 

 

 

 

 

 

The XML snippet seems to be missing. If you're in need of essay writing help, search no more! At https://topwritingreviews.com/services/writinguniverse, you'll discover reviews of writing services tailored to make your academic journey seamless. With a team of expert writers at your disposal, you can expect comprehensive support to ensure the creation of a well-researched and impressive work. These professionals are dedicated to turning your academic aspirations into reality, making the complex task of writing feel like a breeze. 


The XML snippet seems to be missing.

 

 

 

 

 

 

 

 

 

 

 

The XML snippet seems to be missing. If you're in need of essay writing help, search no more! At https://topwritingreviews.com/services/writinguniverse, you'll discover reviews of writing services tailored to make your academic journey seamless. With a team of expert writers at your disposal, you can expect comprehensive support to ensure the creation of a well-researched and impressive work. These professionals are dedicated to turning your academic aspirations into reality, making the complex task of writing feel like a breeze. 

Hi, thanks for replying.

i can see the snippet at the top of the question thread and I also attached it to a reply of neilsgerrits. I have the XMLQueryExtractor working with the initial ‘xpath’ I mentioned, while delcaring the namespace.

 

Regards,


Reply