1

Can someone please help me with this XML? I keep getting an invalid character error. I'm trying to create an XML map to convert data in Excel.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<utilbills-data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<record>
  <bill name>Broome County Industrial Dev Agency</bill name>
  <mailing address>201 Robinson St</mailing address>
  <city>Binghamton</city>
  <state>NY</state>
  <zip Code>13904</zip Code>
  <reference>33 Lewis Rd</reference>
  <propertyid>1</propertyid>
  <bill date>09-30-2019</bill date>
  <due date>10-30-2019</due date>
  <bill number>24597</bill number>
  <memo>Make Checks Payable To Town of Union Water and Sewer</memo>
  <meter>1B</meter>
  <previous balance>$0.00</previous balance>
  <charge>$544.33</charge>
  <description>WATER</description>
  <previous read date>06-05-2019</previous read date>
  <current read date>09-04-2019</current read date>
  <previous reading>0</previous reading>
  <current reading>10858</current reading>
  <usage>10858</usage>
</record>
kjhughes
  • 106,133
  • 27
  • 181
  • 240

2 Answers2

1

Whitespace is not permitted in XML element names (eg bill date).

Allowed alternatives include bill_date, bill.date, bill-date, billDate, and BillDate.

kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • Thank you very much. I had a feeling that was the glitch, but was getting too frustrated. First time using this xml stuff. – Gretchen Uhler Nov 22 '19 at 17:48
  • doh' sham on me for not noticing that. saw the tick and then moved on. yes, no whitepaces allowed in xml tags. – Kakoritz Nov 22 '19 at 18:04
  • Another question with the same coding, but now I get a missing equals sign between attribute and attribute value. Do I have to put " " around every value after the "Broome County".... – Gretchen Uhler Nov 22 '19 at 18:58
  • Your XML has no attributes currently. You may be confusing terminology. `Broome County Industrial Dev Agency` is the *string value* of the `bill_name` *element*; it need have no equal sign or quotes. I suggest that you accept this answer if your original question has been answered and ask a new question where you post your updated XML if this comment doesn't suffice. Thank you. – kjhughes Nov 22 '19 at 20:46
0

you have a single tick at the end of your xml scope.

` <==

Kakoritz
  • 318
  • 1
  • 2
  • 15