Here is a conceptual example for you.
What we need from you is a DDL and sample data population section.
USE tempdb;
GO
-- DDL and sample data population, start
DROP TABLE IF EXISTS dbo.child;
DROP TABLE IF EXISTS dbo.parent;
CREATE TABLE dbo.parent (ID INT IDENTITY PRIMARY KEY, [State] CHAR(2));
CREATE TABLE dbo.child (
ID INT IDENTITY PRIMARY KEY
, ParentID INT NOT NULL FOREIGN KEY REFERENCES dbo.parent(ID)
, City VARCHAR(30)
);
INSERT INTO dbo.parent ([State])
VALUES ('FL')
, ('TX');
INSERT INTO dbo.child (ParentID, City)
VALUES (1, 'Miami')
, (1, 'Fort Lauderdale')
, (2, 'Austin')
, (2, 'Dallas');
-- DDL and sample data population, end
SELECT * FROM dbo.parent;
SELECT * FROM dbo.child;
SELECT ID AS [@id]
, [State] AS [@state]
, (SELECT c.ID AS [@id]
,c.ParentID AS [@parentID]
,c.City AS [@city]
FROM dbo.child AS c
WHERE c.ParentID = p.ID
FOR XML PATH ('city'), TYPE)
FROM dbo.parent AS p
FOR XML PATH('state'), ROOT('states');