Skip to content

Update CPHD XML read to preserve whitespaces#767

Merged
adam-beauchamp merged 2 commits intongageoint:mainfrom
defe007:preserve-xml-whitespace-in-cphd
Dec 17, 2025
Merged

Update CPHD XML read to preserve whitespaces#767
adam-beauchamp merged 2 commits intongageoint:mainfrom
defe007:preserve-xml-whitespace-in-cphd

Conversation

@defe007
Copy link
Copy Markdown

@defe007 defe007 commented Dec 9, 2025

This update will make CPHD XML reader preserve whitespaces. This change was required to preserve the expected whitespaces in certain fields as outlined in the NSGPDD spec.

@adam-beauchamp
Copy link
Copy Markdown
Collaborator

Can you update the following unit tests in cphd to make use of the new functionality?

  • six/modules/c++/cphd/unittests/test_cphd_xml_optional.cpp (line 888-892)
    • also add an assert to diff the input with the buffer owned xml::lite::MinidomParser
  • six/modules/c++/cphd/unittests/test_cphd_xml_control.cpp (line 905-908)
    • also add an assert to diff the input with the buffer owned xml::lite::MinidomParser

Also, can you clone the modded tests above to cphd03 analogues in that unittest dir of that module (it doesn't have any xml tests currently)

@defe007
Copy link
Copy Markdown
Author

defe007 commented Dec 9, 2025

Can you update the following unit tests in cphd to make use of the new functionality?

* `six/modules/c++/cphd/unittests/test_cphd_xml_optional.cpp` (line 888-892)
  
  * also add an assert to diff the input with the buffer owned `xml::lite::MinidomParser`

* `six/modules/c++/cphd/unittests/test_cphd_xml_control.cpp` (line 905-908)
  
  * also add an assert to diff the input with the buffer owned `xml::lite::MinidomParser`

Also, can you clone the modded tests above to cphd03 analogues in that unittest dir of that module (it doesn't have any xml tests currently)

I can update the current unittests for cphd. I took a stab at trying to making copies of these tests for cphd03 but I don't have enough knowledge to know if I'm doing this correctly. There are many fields and parameters that don't exist or differ between the two.

Copy link
Copy Markdown
Collaborator

@adam-beauchamp adam-beauchamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adam-beauchamp adam-beauchamp merged commit 40ee670 into ngageoint:main Dec 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants