I am trying to build a struct to convert to XML using structtoxml. I've got various bits in place using $tags, but I'm having difficulty coding something to build this XML output.
Delivery Note
I've tried.
v_struct->DeliveryNoteHead->DeliveryNoteType = "Delivery Note" v_struct->DeliveryNoteHead->DeliveryNoteType->Code="ASN" v_struct->DeliveryNoteHead->DeliveryNoteType->Code->$tags->xmlClass="attribute"
Which returns
Delivery Note
Even though the struct $dbgstring is
[] [DeliveryNoteHead] [DeliveryNoteType] "Delivery Note" [Code] = "ASN" [$tags] [xmlClass] = "attribute"
I've also tried
v_struct->DeliveryNoteHead->DeliveryNoteType = $newstruct v_struct->DeliveryNoteHead->DeliveryNoteType->Code="ASN" v_struct->DeliveryNoteHead->DeliveryNoteType->Code->$tags->xmlClass="attribute"
Which gives me
How do I get to the element "value", is it a special tag?
I've also tried setting it after the $newstruct and after the "Code" attribute, but in both cases I think it wipes the current struct.
I've tried setting an element in the struct with no name (DeliveryNoteType→"") , which is ignored...
Help!
Iain