Best way to create a Document from a String

I have a String and I need to get a html document from this string so I can use Methodes like getElementsByClassName but I have no idea how to do that.

Hello @Levin, I’m certainly no expert, but I think that might be more of a javascript question than a Fuse question. A quick search resulted in – it’s not built into the js lang, but a framework could have the capability. Whether or not a framework that supports this sort of query works with Fuse would be a different question.

@Levin: you asked pretty much the same thing before, and failed to provide the details necessary for us to be able to help.

Posting new threads that follow the same path won’t get you any nearer to a resolution.

Come back with complete, minimal reproduction that we can copy-paste and run, and we’ll definitely help.

In my opinion you don’t need more detailed information because I asked in general how to create a html document from a string not in reference to my project and thanks @Darrin for your help

Levin: unfortunately, if you continue to ignore our community guidelines, you cannot expect to get much help going forward. Being part of a community includes adhering to the guidelines, being friendly when asking questions, being forthcoming when asked for more information, and above all else: being grateful when aid is given, considering none is owed to you.

If one of our community members (or community managers even) ask you for more information, it’s because more information is needed — simple as that. :slight_smile:

I’m sorry if I sounded rude but I can’t give you more information because that’s all the information I have, I’m asking in general how to create a html element from a string , so I can use stuff like getElementsByClassName .

Hello @Levin! Perhaps what you could do is copy the html you’re getting from your school’s site and paste it in your post. Then identify what you’re looking for, i.e. which element or elements you need and what you want to do with them. I believe the javascript engine in Fuse is limited in html conversion functionality because there is no DOM for it to interface with – making html getElement options useless. The Fuse guys can confirm or deny this conjecture.

If you’re simply looking for a specific piece of information the page is returning, you could parse the string yourself and find what you are looking for by seeking out the surrounding tags.

/===============

@Bent/@Uldis – you guys do a great job supporting these forums, but I have to admit, sometimes you guys are a little too blunt and/or harsh. After all, you are supporting a commercial product and harsh comments can be off-putting to potential customers/users – whether they are asking the question or simply reading through the comments. As company representatives, chastising and arguing with posters can give the feeling you really don’t want to help and are simply being paid to. No one wants to post something in fear they might be violating some rule or that the moderators might attack them for their ignorance. Without posts (and responses), a forum community dies. Unfortunately, these forums aren’t swarming with enough community activity to just let them thrive on their own – they need your positive help, guidance, and higher standard of interaction. Perception is reality and intent & tone are frequently misinterpreted. Fuse is an awesome product and the support in these forums is usually top-notch – I think we all want to see the product succeed and are super appreciative of the help we get. Just my 2-cents, I’ll get off my soap box now. :wink:

@Darrin thanks for your answer and your help. I will try to relize it how you suggested.

Darrin: thanks for the feedback. Sometimes it’s hard to have patience, especially after hour long back and forths with users who show little or no interest in understanding the underlying issues, and that’s when patience runs thin. Thankfully, I don’t consider that to be an everyday occurrence.

When building a product used by mostly community members, there is always a balance to be had between guiding people and enforcing the guidelines (which exists for a very good reason), and finding that balance is an ongoing effort, not just for our community but for all communities surrounding any kind of group, interest or product.

Fuse staff are attending to our community forums (and other channels) on their own time, as we don’t offer support outside of our paid tiers, and I’m very understanding of Uldis’ who in this case was told there was no more information to be given when there clearly was.

So yeah: we’re not perfect, our users aren’t perfect, and sometimes we refer to our guidelines and rules – I don’t see that as a systemic problem or something to be blown out of proportions. I hope you don’t either. :slight_smile:

@Bent, thanks for the reply – I honestly wasn’t sure what to expect, but I know I had a gut reaction to some of the posts in these forums and I’m assuming I’m not alone. It felt like the appropriate time to express my thoughts (and I am aware this thread has rapidly outgrown the place to do so). I am fully aware of the ins and outs of customer service. I get it and I understand – and maybe as such, I’m over-sensitive to it. I also understand handing out so much to the free side of the business isn’t the fun part for sure. I guess my main point above might have been misunderstood. It’s not the what’s and why’s of things (referring to rules and questions), it is all in the how’s – how it is presented.

I don’t purport to have inside business knowledge about Fuse the company – but I do know a lot can be gleaned by its community and overall popularity of the tool. All of us are here because we love (or might grow to love) Fuse and I, for one, can’t understand why it isn’t ravaging the popularity polls. I do know however, the community has to grow to grow the product and as the old saying goes, perhaps honey might work better than vinegar. :wink:

Again, the support you guys provide (Uldis is awesome and tireless) is greatly appreciated. Simply offering a perspective.

Your perspective is very welcome, thanks for offering it. :slight_smile: