Aiyu Sheng
Aiyu Sheng

Reputation: 15

Recognize Xpath for EMPTY element

Part of my XML is below, with the help of others I knew it is correct but just empty element.

It seems that I can use the Xpath for and to check their existence but when I use the Xpath for or , it returns empty.

elements/attributes/tags etc has "/" in it

                        <securityConfigSMC>
                            <securityAlgorithmConfig>
                                <cipheringAlgorithm><nea2/></cipheringAlgorithm>
                                <integrityProtAlgorithm><nia2/></integrityProtAlgorithm>
                            </securityAlgorithmConfig>
                        </securityConfigSMC>

Upvotes: 0

Views: 60

Answers (1)

Michael Kay
Michael Kay

Reputation: 163635

Whatever your problem is, it's not caused by the empty element tags such as <nea/>, which are perfectly correct XML.

It always helps to say what symptoms you are seeing (e.g. error messages, empty results) rather than just telling us that something doesn't work.

Upvotes: 1

Related Questions