Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support xml attributes #388

Open
skjnldsv opened this issue Dec 4, 2024 · 1 comment · May be fixed by #391
Open

Support xml attributes #388

skjnldsv opened this issue Dec 4, 2024 · 1 comment · May be fixed by #391

Comments

@skjnldsv
Copy link
Contributor

skjnldsv commented Dec 4, 2024

Xml example

<?xml version="1.0"?>
<d:multistatus
	xmlns:d="DAV:"
	xmlns:s="http://sabredav.org/ns"
	xmlns:oc="http://owncloud.org/ns"
	xmlns:nc="http://nextcloud.org/ns">
<d:response>
		<d:href>/remote.php/dav/files/admin/benjamin-lehman-xnTcEJm5IZw-unsplash.jpg</d:href>
		<d:propstat>
			<d:prop>
				<nc:system-tags>
					<nc:system-tag oc:can-assign="true" oc:id="321" oc:user-assignable="true" oc:user-visible="true">Test</nc:system-tag>
				</nc:system-tags>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
	</d:response>
</d:multistatus>

Issue

Currently, the fast-xml-parser ignore attributes.
A quick test, passing the following options would allow us to retrive the attributes like so

        attributeNamePrefix: "",
        ignoreAttributes: false,
        textNodeName: "text",

image

I think adding a proper method to process those would be best, so we can keep the namespaces and avoid conflicts?

@skjnldsv
Copy link
Contributor Author

skjnldsv commented Dec 9, 2024

PR incoming

@skjnldsv skjnldsv linked a pull request Dec 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant