I have a DITA map (XML document), where I'm trying to visually build a text file.
Here's an extract:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//ELEMENTS DITA Map//EN" "map.dtd">
ditaarch:DITAArchVersion="1.2"
id="lou1375305364946"
xml:lang="en-us">
<title>app note</title>
<topicref keys="lou1367512903038" href="lou1367512903038.xml" type="reference">
<topicref keys="lou1387324160222" href="lou1387324160222.xml" type="reference">
<topicref keys="lou1397064605122" href="lou1397064605122.xml"
type="reference"/>
</topicref>
<topicref keys="lou1387229890414" href="lou1387229890414.xml" type="reference">
<topicref keys="lou1375985424101" href="lou1375985424101.xml" type="task">
<topicref keys="lou1375999330446" href="lou1375999330446.xml" type="reference">
<topicref keys="lou1375998148445" href="lou1375998148445.xml" type="reference">
<topicref keys="lou1376001561381"
href="lou1376001561381.xml" type="reference"/>
<topicref keys="lou1376001612107" href="lou1376001612107.xml" type="task"/>
<topicref keys="lou1376001839463" href="lou1376001839463.xml" type="reference"/>
</topicref>
<topicref keys="lou1376001962698" href="lou1376001962698.xml" type="reference"/>
<topicref keys="lou1376083974509" href="lou1376083974509.xml" type="reference"/>
<topicref keys="lou1376002273220" href="lou1376002273220.xml" type="reference"/>
<topicref keys="lou1376002339131" href="lou1376002339131.xml" type="reference"/>
<topicref keys="lou1376002410143" href="lou1376002410143.xml" type="reference"/>
</topicref>
</topicref>
</topicref>
Is there a way to test if there is a child node? Then parse those before moving down the tree?
Wayne