Skip to main content

I'm reading an XML with ticket details that has xsi:nil=true in the tag and it adds the field name with .nil

Also,there is a tag with xlmns andIm not sure if I have to use a List Exploder to further get its attributes.

I'm a novice FME user and have no prior experience with xml either

I'm looking for direction on how to resolve the field names to be the tag text and populate its values in ESRI Gdb format

Any help will be much appreciated

Hi @adi,

It would be useful if you can share the XML input so that we can assist you.


Hi @adi, 

It would be useful if you can share the XML input so that we can assist you.

Hello @itay

Thankyou for taking time to look into this ,

here is a sample xml ,its ticket information that Im trying to write into SQL ,or Esri gdb

 

 

<?xml version="1.0" encoding="utf-8"?>
<test:testReferral xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:test="http://www.example.com/test"

 

="https://www.example.com/test/bydp.xsd">
  <test:Details>
    <test:MessageVersionNumber>1.0.10</test:MessageVersionNumber>
    <test:From>Before You Dig Partners</test:From>
    <test:RequestMedium>Phone</test:RequestMedium>
    <test:UtilityID>10038</test:UtilityID>
    <test:StationCode>value1            </test:StationCode>
    <test:TicketNumber>20184200087</test:TicketNumber>
    <test:PreviousTicketNumber xsi:nil="true" />
    <test:SequenceNumber>41199</test:SequenceNumber>
    <test:RequestDateTime>2018-10-19T12:02:21.295959-05:00</test:RequestDateTime>
    <test:WorkToBeginDate>2018-10-23T03:00:00-05:00</test:WorkToBeginDate>
    <test:WorkCompletionDate xsi:nil="true" />
    <test:IsEmergency>False</test:IsEmergency>
    <test:UserReference xsi:nil="true" />
    <test:StationList>
      <StationCode xmlns="test">value1             </StationCode>
      <StationCode xmlns="test">value2            </StationCode>
      <StationCode xmlns="test">value3            </StationCode>
      <StationCode xmlns="test">value4           </StationCode>
    </test:StationList>
  </test:Details>

I have tried using Feature paths for the configuratio Type and Elements to match to the node to Details .There is two entries with Previous Ticket Number and Previous Ticket Number.nil how would i handle this . which one should I keep0684Q00000ArMmvQAF.png


Hello @adi, the 

<test:PreviousTicketNumber xsi:nil="true" />

Just tells you that the PreviousTicketNumber attribute doesn't necessarily need to have a value (true), if you are only interested in the PreviousTicketNumber value you can ignore the PreviousTicketNumber.nil tag


Hello @itay

Thankyou for taking time to look into this ,

here is a sample xml ,its ticket information that Im trying to write into SQL ,or Esri gdb

 

 

<?xml version="1.0" encoding="utf-8"?>
<test:testReferral xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:test="http://www.example.com/test"

 

="https://www.example.com/test/bydp.xsd">
  <test:Details>
    <test:MessageVersionNumber>1.0.10</test:MessageVersionNumber>
    <test:From>Before You Dig Partners</test:From>
    <test:RequestMedium>Phone</test:RequestMedium>
    <test:UtilityID>10038</test:UtilityID>
    <test:StationCode>value1            </test:StationCode>
    <test:TicketNumber>20184200087</test:TicketNumber>
    <test:PreviousTicketNumber xsi:nil="true" />
    <test:SequenceNumber>41199</test:SequenceNumber>
    <test:RequestDateTime>2018-10-19T12:02:21.295959-05:00</test:RequestDateTime>
    <test:WorkToBeginDate>2018-10-23T03:00:00-05:00</test:WorkToBeginDate>
    <test:WorkCompletionDate xsi:nil="true" />
    <test:IsEmergency>False</test:IsEmergency>
    <test:UserReference xsi:nil="true" />
    <test:StationList>
      <StationCode xmlns="test">value1             </StationCode>
      <StationCode xmlns="test">value2            </StationCode>
      <StationCode xmlns="test">value3            </StationCode>
      <StationCode xmlns="test">value4           </StationCode>
    </test:StationList>
  </test:Details>

I have tried using Feature paths for the configuratio Type and Elements to match to the node to Details .There is two entries with Previous Ticket Number and Previous Ticket Number.nil how would i handle this . which one should I keep0684Q00000ArMmvQAF.png

Hello @adi, the 

<test:PreviousTicketNumber xsi:nil="true" />

Just tells you that the PreviousTicketNumber attribute doesn't necessarily need to have a value (true), if you are only interested in the PreviousTicketNumber value you can ignore the PreviousTicketNumber.nil tag


Hello @adi, the 

<test:PreviousTicketNumber xsi:nil="true" />

Just tells you that the PreviousTicketNumber attribute doesn't necessarily need to have a value (true), if you are only interested in the PreviousTicketNumber value you can ignore the PreviousTicketNumber.nil tag

Hello @itay,Thank you for your suggestion on this ,I removed the nil attributes from the user attribute list,but I still need to figure out xlmns tag ,I have a used a list exploder and that resulted in additional records where as opposed to only one.

 

 


Hello @adi, the 

<test:PreviousTicketNumber xsi:nil="true" />

Just tells you that the PreviousTicketNumber attribute doesn't necessarily need to have a value (true), if you are only interested in the PreviousTicketNumber value you can ignore the PreviousTicketNumber.nil tag

Hello @itay,I have removed the xlmns tags from the attributes and I got the expected output.Thank you


Reply