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

Getting this error message when trying to convert hkx to xml through command line with .net version #3

Open
Chris-M-Bennett opened this issue Jan 19, 2023 · 1 comment

Comments

@Chris-M-Bennett
Copy link

Unhandled exception: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at HKX2.XmlDeserializer.Deserialize(Stream stream, HKXHeader header, Boolean ignoreNonFatalError)
at hkxconv.cmd.Convert.ConvertTo(FileInfo inFile, FileInfo outFile, ConvertFormat format, Boolean verbose, Boolean ignoreError)
at hkxconv.cmd.Convert.ToFormat(FileSystemInfo input, FileSystemInfo output, ConvertFormat format, Boolean verbose, Boolean ignoreError)
at hkxconv.Program.<>c.

b__0_4(ConvertFormat format, Boolean verbose, Boolean ignoreErrorOpt, FileSystemInfo input, FileSystemInfo output)
at System.CommandLine.Handler.<>c__DisplayClass6_0`5.b__0(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.Invoke(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<b__0>d.MoveNext()

@ret2end
Copy link
Owner

ret2end commented Jan 19, 2023

Seem like you are using wrong flag?
To hkx => xml pass -v hkx fileToConvert.xml make sure it is xml
xml => hkx pass -v xml fileToConvert.hkx

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

No branches or pull requests

2 participants