Question

GML clean up

  • 9 September 2015
  • 2 replies
  • 0 views

Userlevel 3
Badge +13
Hy,

 

I have same problem with save data to GML. I need to validate this data with xsd shema before writing. But I have problem with empty elements, how to clean up empty elements before writing GML?

2 replies

Userlevel 4
Hi

 

 

If you can pass the XML through the XMLFormatter, it has an option to remove empty elements.

 

 

You can also chain a couple of StringReplacers, like this:

 

 

 

 

 

 

This will remove empty elements of type

 

 

<SomeElement />

 

 

and 

 

 

<SomeElement></SomeElement>

 

 

David
Userlevel 3
Badge +13
Thanks for reply. I used solution from this  topic: https://knowledge.safe.com/AnswersQuestionDetail?id=906a0000000cndMAAQ

Reply