in reply to Re^2: Perl parsing XML using XML::Simple
in thread Perl parsing XML using XML::Simple
Something like this:
Will parse.<myxml xmlns:xs='bla'> <xs:complexType name="AlternateSecurityIdentification1"> <xs:sequence> <xs:element name="Id" type="Max35Text"/> <xs:choice> <xs:element name="DmstIdSrc" type="CountryCode"/> <xs:element name="PrtryIdSrc" type="Max35Text"/> </xs:choice> </xs:sequence> </xs:complexType> </myxml>
Also:
Is probably easier written as:foreach my $complex(keys %{$data->{'xs:complexType'}}) { print $complex; my $seq = $data->{'xs:complexType'}->{$complex}->{'xs:sequence'};
Then print()/Dump() the data you've got at various stages and see which line(s) are causing problems.foreach my $subseq (values %{$data->{'xs:complexType'}}) { my $seq = $subseq->{'xs:sequence'};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl parsing XML using XML::Simple
by thickice97 (Initiate) on Jan 22, 2008 at 23:03 UTC |