January 28th, 2013, 04:06 PM
I have been thrust into this role and this is the my first time looking at XML Code and I am stumped :
I am supporting a piece of code that is generating check data. This XML code is working nice but when it extracts a zip code field that begins with a leading Zero it is dropping that zero and making the Zip invalid( example zip 06060 is appearing as 6060).
I have never worked with XML before so how can I add a zero if zip code length < 5 characters ?
Below is the XML piece that extracts the zipcode:
<Element type="DataElement" length="10" padchar="" justify="R" field="Summary/Address/PostCode" />
I need to leave the length at 10 to allow for addresses with ZIP+4, so just 0 padding fixed my issue but created another.
save the Noob and save the world
January 28th, 2013, 05:02 PM
It's not really a question of XML: whatever code that generated the XML is what you have to fix.
Sounds like it's treating the zip code as a number when it shouldn't?