The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

"Read XML, reading Parent attributes"

francis_sathiakfrancis_sathiak Member Posts: 2 Learner I
edited May 2019 in Help
Hey All,  

Have been using the Data import Wizard, and on Step 4 when you define you xpaths i have an attribute set up using "../" to get a parent attribute of all the entries. In step 4 it actually shows the correct current value but in step 5 when it shows the preview of the 100 rows that defind attribute is blank.. It is also blank when i export the data. 

My data looks like this 
<routeCondition>
      <spatialRuleCode>INCLUSION</spatialRuleCode>
      <segment>
        <persistentIdentifier>NSW5</persistentIdentifier>
        <segmentText>UNNAMED</segmentText>
      </segment>
      <segment>
        <persistentIdentifier>NSW5128</persistentIdentifier>
        <segmentText>FEDERAL</segmentText>
      </segment>
<routeCondition>
      <spatialRuleCode>EXCLUSION</spatialRuleCode>
      <segment>
        <persistentIdentifier>NSW5005</persistentIdentifier>
        <segmentText>FEDERAL</segmentText>
      </segment>
      <segment>
        <persistentIdentifier>NSW5025</persistentIdentifier>
        <segmentText>FEDERAL</segmentText>
      </segment>
      <segment>
        <persistentIdentifier>NSW5505</persistentIdentifier>
        <segmentText>FEDERAL</segmentText>
      </segment>
      <segment>
        <persistentIdentifier>NSW500517065</persistentIdentifier>
        <segmentText>FEDERAL</segmentText>
      </segment>
<routeCondition>
      <spatialRuleCode>INCLUSION</spatialRuleCode> 
      <segment>
        <persistentIdentifier>1706</persistentIdentifier>
        <segmentText>FEDERAL</segmentText>
      </segment>
      <segment>
        <persistentIdentifier>7030</persistentIdentifier>
        <segmentText>FEDERAL</segmentText>
      </segment>
Because the number of segments change for each route condition, i had selected my xpath for examples to be //routeCondition/segment
and set up my attributes as follows 
../spatialRuleCode/text()

persistentIdentifier[1]/text()

segmentText[1]/text()

and was hoping for an output of 

INCLUSION  NSW5 UNNAMED
INCLUSION NSW5128 FEDERAL
EXCLUSION NSW5005 FEDERAL
EXCLUSION NSW5025 FEDERAL
EXCLUSION NSW5505 FEDERAL
INCLUSION  NSW1706 UNNAMED
INCLUSION NSW7030 FEDERAL

But the attributes for spatialRuleCode are blank any help?? hopefully its just the notation of '..' that is wrong.. 

Tagged:

Best Answer

Answers

  • francis_sathiakfrancis_sathiak Member Posts: 2 Learner I
    Such an awesome and scalable solution, thanks so much. Is there any documentation around for the text mining extension would love to get more info. 
Sign In or Register to comment.