We are having trouble inserting a line into XML when using
straight string manipulation it blows up on XML Search. We
are guessing that there is a better
way to insert the line. Details below.
The existing XML structure shows (partial XML is noted in
the examples below and does not represent the entire xml
document):
<ClientReferences>
<IdValue
name="ClientReferenceField2_Value">crf2</IdValue>
</ClientReferences>
We wish to add another <IdValue> node before the
ClientReferenceField2_Value attribute as follows:
<IdValue
name="ClientReferenceField1_Value">crf1</IdValue>
The resulting XML structure would show:
<ClientReferences>
<IdValue
name="ClientReferenceField1_Value">crf1</IdValue>
<IdValue
name="ClientReferenceField2_Value">crf2</IdValue>
</ClientReferences>
The full Xpath to <ClientReferences> is as follows:
/BackgroundCheck/BackgroundSearchPackage/Screenings/ClientReferences
Notes:
- Assume the existing XML document is in a
ColdFusion structure through the use of XmlParse()
- The resulting XML should be maintained as a
ColdFusion structure that will allow Xpath searches using
XMLSearch()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284541
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4